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 200892458 at 2009-04-04 09:04:12 on Problem 1942
#include<stdio.h>
int main()
{
	__int64 a[100][2];
	__int64 s;
	int k;
	int i=0;
	__int64 sum;
	int j;
	__int64 m[100],n[100];
    scanf("%I64d%I64d",&n[i],&m[i]);
	i++;
	while(!(n[i-1]==0&&m[i-1]==0))
	{
		scanf("%I64d%I64d",&n[i],&m[i]);
		i++;
	}
    for(j=0;j<i-1;j++)
	{
		s=n[j]<m[j]?n[j]:m[j];
		sum=1;
        for(k=1;k<=s;k++)
		{
			if(s==0)
				break;
			else
                sum=sum*(m[j]+n[j]-s+k)/k;
		}
		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