답안 #392820

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
392820 2021-04-21T21:04:50 Z rainboy 마라톤 경주 (COCI14_utrka) C
80 / 80
30 ms 2508 KB
#include <stdio.h>
#include <string.h>

int main() {
	static char cc[32];
	int n;

	scanf("%d", &n), n = n * 2 - 1;
	while (n--) {
		static char aa[32];
		int l, h;

		scanf("%s", aa), l = strlen(aa);
		for (h = 0; h < l; h++)
			cc[h] ^= aa[h];
	}
	printf("%s\n", cc);
	return 0;
}

Compilation message

utrka.c: In function 'main':
utrka.c:8:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    8 |  scanf("%d", &n), n = n * 2 - 1;
      |  ^~~~~~~~~~~~~~~
utrka.c:13:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   13 |   scanf("%s", aa), l = strlen(aa);
      |   ^~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 15 ms 1412 KB Output is correct
7 Correct 22 ms 1928 KB Output is correct
8 Correct 28 ms 2312 KB Output is correct
9 Correct 30 ms 2508 KB Output is correct
10 Correct 30 ms 2500 KB Output is correct