답안 #335629

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
335629 2020-12-13T11:26:56 Z Joshc 마라톤 경주 (COCI14_utrka) Python 3
80 / 80
390 ms 17884 KB
n = int(input())
people = {}
for i in range(n):
  a = input()
  if a not in people:
    people[a] = 1
  else:
    people[a] += 1
for i in range(n - 1):
  a = input()
  people[a] -= 1
for a in people:
  if people[a] != 0:
    print(a)
    break;
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 2796 KB Output is correct
2 Correct 16 ms 2796 KB Output is correct
3 Correct 18 ms 2924 KB Output is correct
4 Correct 20 ms 2924 KB Output is correct
5 Correct 21 ms 3200 KB Output is correct
6 Correct 205 ms 10608 KB Output is correct
7 Correct 308 ms 12180 KB Output is correct
8 Correct 390 ms 13240 KB Output is correct
9 Correct 379 ms 17884 KB Output is correct
10 Correct 371 ms 17884 KB Output is correct