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

wa了n久,不懂为什么

Posted by 082811381 at 2009-08-19 20:05:51 on Problem 1942
#include <iostream>
using namespace std;

int main()
{
    __int64 a,b;
    while(scanf("%I64d%I64d",&a,&b))
    {
        if(a == 0&&b == 0)                          
               break;
        __int64 i,t = a+b;       
        __int64 sum =1;
        if(a > b)
             a = b;
        for(i = t;i > t-a;i--)
            sum *= i;
        for(i = 2;i <= a;i++)
              sum /= i;
          printf("%I64d\n",sum);
    }
    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