Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Posted by 2009550934 at 2011-08-07 21:04:46 on Problem 3673
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator