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

why runtime error?

Posted by xiaoyaoxia at 2009-04-06 14:02:15 on Problem 2249
#include<stdio.h>
__int64 C(__int64 n,__int64 m)
{		  
	if(m==0)
		return 1;
	else if(m==1)
		return n;
	else
		return C(n-1,m-1)*n/m;
}
int main()
{
	__int64 n,k;
	while(scanf("%I64d%I64d",&n,&k)!=EOF)
	{
		if(n==0&&k==0)
			break;
		printf("%I64d\n",C(n,k));
	}
	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