| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
为什么这么水的题我的代码却总是time error! help!#include<stdio.h>
void main()
{
long int N,i,j;
__int64 m,n;
__int64 sum[100];
scanf("%d",&N);
for(i=0;i<N;i++)
{
scanf("%I64d %I64d",&m,&n);
if(m<n)
sum[i]=(n-m+1)*(n+m)/2;
}
for(j=0;j<N;j++)
printf("Scenario %c%d:\n%I64d\n\n",'#',j+1,sum[j]);
}
用C提交的
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator