| ||||||||||
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 |
水啊#include<cstdio> int main() { int x,y,lena=0,lenb=0,i,j,ans=0,a[100],b[100]; scanf("%d%d",&x,&y); while(x) { lena++; a[lena]=x%10; x=x/10; } while(y) { lenb++; b[lenb]=y%10; y=y/10; } for(i=1;i<=lena;i++) for(j=1;j<=lenb;j++) ans+=a[i]*b[j]; printf("%d\n",ans); } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator