neetsdkasu
|
codepad
|
|
neetsdkasu
|
Saved pastes by neetsdkasu:
main = print $ length . filter id $ map (\x -> solve x == solve2 x) [1..100]
solve n = ans where
ans = fst $ foldl h (0, 0) $ map g [1..n]
g x = (x, f 0 x)
|
view (12 lines, 1 line of output) |