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 高手指点一下 不胜感激

Posted by wangfengtian at 2008-12-07 18:57:45 on Problem 2509
#include<stdio.h>
void main()
{
	int m,n,i,j;
	__int64 a[1000];
	__int64 f(int m,int n);
	for(i=0;m!=EOF;i++)
	{
		scanf("%d%d",&m,&n);
		a[i]=f(m,n);
	}
	for(j=0;j<i;j++)
		printf("%I64d\n",a[j]);
}
__int64 f(int m,int n)
{
	__int64 t;
	if(m<n)
		return m;
	m=m-n+1;
	t=n+f(m,n);
	return t;
}

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