#include <stdio.h>
#include <stdlib.h>
int main()
{
int in[20],ex[20],max=0,sum=0,i,j;
for(i=1;i<=10;i++)
{
scanf("%d %d",&ex[i],&in[i]);
}
for(i=1;i<=10;i++)
{
sum = sum - ex[i];
sum = sum + in[i];
if(max < sum)
{
max = sum;
}
}
printf("%d",max);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1084 KB |
Output is correct |
2 |
Correct |
0 ms |
1084 KB |
Output is correct |
3 |
Correct |
0 ms |
1084 KB |
Output is correct |
4 |
Correct |
0 ms |
1084 KB |
Output is correct |
5 |
Correct |
0 ms |
1084 KB |
Output is correct |
6 |
Correct |
0 ms |
1084 KB |
Output is correct |
7 |
Correct |
0 ms |
1084 KB |
Output is correct |
8 |
Correct |
0 ms |
1084 KB |
Output is correct |
9 |
Correct |
0 ms |
1084 KB |
Output is correct |
10 |
Correct |
0 ms |
1084 KB |
Output is correct |