제출 #471507

#제출 시각아이디문제언어결과실행 시간메모리
471507rainboyAron (COCI17_aron)C11
50 / 50
1 ms276 KiB
#include <stdio.h>

int main() {
	int n, ans;
	char c;

	scanf("%d", &n);
	c = '?', ans = 1;
	while (n--) {
		static char s[2];

		scanf("%s", s);
		if (c != s[0])
			c = s[0], ans++;
	}
	printf("%d\n", ans);
	return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

aron.c: In function 'main':
aron.c:7:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    7 |  scanf("%d", &n);
      |  ^~~~~~~~~~~~~~~
aron.c:12:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |   scanf("%s", s);
      |   ^~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...