Period of first differences by nooodl

main=interact$unlines.map(show.f.map read.words).lines;f x=c$zipWith(-)x$tail x;c l=head[n+1|n<-[0..],and$zipWith(==)l$map(l!!)(cycle[0..n])]

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page