f=1:scanl(+)1 f main=getContents>>=mapM(print.sum.map(^2).flip take f.read).tail.lines
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page