Submission #20215

#TimeUsernameProblemLanguageResultExecution timeMemory
20215jjyoonki지능형 기차 2 (KOI11_train2)C11
16 / 16
1 ms0 KiB
#include <stdio.h> int main(void) { int a, b, n; int s, smax; s = 0; smax = 0; for( n=0 ; n<10 ; n++ ){ scanf( "%d %d", &a, &b ); s += (b-a); if( smax<s ) smax = s; } printf( "%d\n", smax ); return 0; }

Compilation message (stderr)

train.c: In function 'main':
train.c:10:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   scanf( "%d %d", &a, &b );
   ^
#Verdict Execution timeMemoryGrader output
Fetching results...