답안 #147153

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
147153 2019-08-28T06:10:41 Z jh05013 Elder (COCI19_elder) Python 3
50 / 50
26 ms 3556 KB
wand = input()
n = int(input())
owner = {wand}
for i in range(n):
    w, l = input().split()
    if l == wand:
        wand = w
        owner.add(wand)
print(wand)
print(len(owner))
# 결과 실행 시간 메모리 Grader output
1 Correct 25 ms 3556 KB Output is correct
2 Correct 25 ms 3256 KB Output is correct
3 Correct 25 ms 3300 KB Output is correct
4 Correct 24 ms 3300 KB Output is correct
5 Correct 25 ms 3300 KB Output is correct
6 Correct 24 ms 3300 KB Output is correct
7 Correct 25 ms 3300 KB Output is correct
8 Correct 26 ms 3256 KB Output is correct
9 Correct 25 ms 3240 KB Output is correct
10 Correct 24 ms 3300 KB Output is correct