long long n,x,b;main(a){for(;~scanf("%lld",&n);printf("%d\n",x))for(x=0,a=b=1;n;n/=10,b*=a++)x+=n%10*b;}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page