int b;f(n){n&&putchar(48+n%b,f(n/b));}main(n){for(;~scanf("%d %d",&n,&b);f(n),puts(""));}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page