FRACTRAN fixed by test 3 has 201 lines instead of 200

!n{z=split($0,_);getline n;s=201;while(s--){printf"%d\n",m=n;for(i=1;i<z;i+=2)if(1>n*_[i]%_[i+1]){n*=_[i]/_[i+1];break}s*=m!=n}}

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

download

return to the top page