FRACTRAN fixed by recursive

I=map(int,raw_input().split())
n=input()
exec"print n;n=[n*N/D for N,D in zip(I[::2],I[1::2])if n%D<1][0];"*201

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

download

return to the top page