[ create a new paste ] login | about

Link: http://codepad.org/plvEcNXF    [ raw code | output | fork ]

Haskell, pasted on Nov 18:
1
2
3
4
5
6
7
mx = ["0317598642","7092154863","4206871359","1750983426","6123045978",
      "3674209581","5869720134","8945362017","9438617209","2581436790"]

cc n   = foldl cd 0 (map (read . (:[])) $ show n)
cd o n = read . (:[]) . head . drop n . head . drop o $ mx

main = print (cc 572) >> print (cc 5724)


Output:
1
2
4
0


Create a new paste based on this one


Comments: