| ||||||||||
| 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<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#define N 1004
#define inf 100000000
using namespace std;
int main()
{
char a[12],b[12];
while(cin >>a >> b)
{
int na,nb,i;
for(na = 0,i= 0;a[i]!='\0';i++)
na += a[i] - '0';
for(nb = 0,i= 0;b[i]!='\0';i++)
nb += b[i] -'0';
cout << na * nb << 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