제출 #20215

#제출 시각아이디문제언어결과실행 시간메모리
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;
}

컴파일 시 표준 에러 (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...