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

Re:郁闷!!我也WA了

Posted by 1825010023 at 2019-04-20 15:18:28 on Problem 2562
In Reply To:郁闷!!我也WA了 Posted by:oassuperhan at 2009-01-23 08:15:34
> #include <iostream>
> using namespace std;
> int main()
> {
>     long long a,b,carry=0;
>     while(cin>>a>>b&&(a&&b))
>     {
>         carry=0;
>         while(a&&b)
>         {
>             if(a%10+b%10>9)
>             {
>                 carry++;
>                 a+=10;
>             }
>             a/=10;b/=10;    
>         }
>         if(!carry)
>         {
>             cout<<"No carry operation."<<endl;
>         }    
>         else if(carry==1)
>             cout<<"1 carry operation."<<endl;
>         else cout<<carry<<" carry operations."<<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