Period of first differences by hallvabo

while~0:_=map(int,raw_input().split());i=len(_);n=i-1;exec"i-=1;_[~i]-=_[-i];"*n+'i+=n/i*_[:i]!=_[:n/i*i];'*n;print+i

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

download

return to the top page