a,i=2;main(l,n){for(n=atoi(gets(n))?:!puts(n);n/l;printf("%d ",n%i++))for(a=l;l%i;l+=a);}
Standard input is empty
0
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!