Back to task

205 symbols haskell
Tue Sep 18 06:30:45 2018 YoshikuniJujo
main=interact$unlines.map(uncurry(:).g.read).tail.lines
g n=(s!!(n-m),' ':s)where((m,_),s)=last.takeWhile((n>=).fst.fst).scanl(\((_,a),_)(b,c)->((a,a+b),c))((0,1),"")$map((\s->(length s,s)).show.(^2))[1..]


Leave a comment

Parsed as Markdown

Login to leave a comment