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

你的改成C的就行了

Posted by Gchris at 2006-12-11 18:03:30 on Problem 2924
In Reply To:为什么WA???????? Posted by:y05zh at 2006-08-17 14:28:35
#include<stdio.h>
#include<math.h>

int main()
{
	__int64 x,y;
	__int64 sum;
	int i,n;
//	cin>>n; 
         scanf("%d",&n) ;
	for(i=0;i<n;i++)
	{       
		//int flag=0;
		

		scanf("%I64d%I64d",&x,&y);
		

		sum=(x+y)*(y-x+1)/2;
	//	if(flag==1)printf("-");
		printf("Scenario #%d:\n",i+1);

		printf("%I64d\n",sum);

		printf("\n");
	}
	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