Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
shorter recursive code?A,B,r=0;f(a,b){if(b){r+=(a%10)*(b%10);f(a,b/10);}else if(a)f(a/10,B);}main(){scanf("%d%d",&A,&B);f(A,B);printf("%d",r);} Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator