FRACTRAN fixed by nn

for(m=(r=readline)(print(n=r(f=r())));m--;)for(x=1,r=/\d+/g;a=r(f)*n;x=a%b<x?print(n=a/b):x)b=r(f)

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

download

return to the top page