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 |
water water water water#include<iostream> using namespace std; int main() { char a[20],b[20]; int m,n,sum=0; cin>>a>>b; m=strlen(a); n=strlen(b); for(int k=0;k<m;k++) for(int i=0;i<n;i++) sum+=(a[k]-'0')*(b[i]-'0'); cout<<sum<<endl; return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator