Project Euler 73

http://projecteuler.net/index.php?section=problems&id=73


速くなる書き方もあるが、ここは題意を素直に表現。

count_numerator d = length (filter (\n -> gcd d n == 1)
                            [(div d 3)+1..div (d-1) 2])
main = print (sum (map count_numerator [1..12000]))