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

这程序怎么老是runtime error, 求各位大神帮帮忙, 小弟在这先谢了!

Posted by woshiliyiyiyiyi at 2012-05-27 10:19:42 on Problem 3406
#include<stdio.h>

int main()
{
	long m, n, i, k = 1, sum = 1, count = 0;
	int ques;

	while (scanf("%ld %ld", &n, &m) != EOF)
	{
		k = 1;
		sum = 1;
		for (i=m+1; i<=n; i++)
			k *= i;

		for (i=n-m; i>=2; i--)
			sum *= i;
	
		ques = k /sum;
		printf("%d\n", ques);
	}

	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