1
0
Fork 0

Problem 73

This commit is contained in:
Jonathan Chan 2017-07-03 12:32:56 -07:00
parent 9efc3acd17
commit 47496fe020
4 changed files with 10 additions and 0 deletions

BIN
73 Executable file

Binary file not shown.

BIN
73.hi Normal file

Binary file not shown.

10
73.hs Normal file
View File

@ -0,0 +1,10 @@
import Data.Ratio
numOfFrac bound = sum $ map (\d -> let nLower = ceiling (d % 3)
nUpper = floor (d % 2)
in length [n | n <- [nLower..nUpper],
let ratio = (n % d), ratio > (1 % 3), ratio < (1 % 2),
denominator ratio == d])
[2..bound]
main = print $ numOfFrac 12000

BIN
73.o Normal file

Binary file not shown.