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

water water water water

Posted by huangdiandian at 2010-07-18 14:09:02 on Problem 3673
#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:
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