| ||||||||||
| 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 | |||||||||
高手认为???高手认为这道题我们应该注意些什么呢??为什么我的这个代码就不通呢???
#include<stdio.h>
void main()
{
long l,s,sum;long i, m,a[1000][2];
scanf("%d %d",&l,&m);
while(l!=0&&m!=0)
{
sum=0;
s=0;
for(i=0;i<m;i++)
{
scanf("%d %d",&a[i][0],&a[i][1]);
}
for(i=0;i<m;i++)
s=a[i][1]-a[i][0]+s+1;
sum=l+1-s;
printf("%d\n",sum);
scanf("%d %d",&l,&m);
}
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator