| ps | |
|---|---|
| 링크 | acmicpc.net/… |
| 출처 | BOJ |
| 문제 번호 | 10546 |
| 문제명 | 배부른 마라토너 |
| 레벨 | 실버 4 |
| 분류 |
기초 |
| 시간복잡도 | O(n*l) |
| 인풋사이즈 | n<=10^5, l<=20 |
| 사용한 언어 | Python |
| 제출기록 | 44720KB / 172ms |
| 최고기록 | 160ms |
| 해결날짜 | 2022/04/24 |
"""Solution code for "BOJ 10546. 배부른 마라토너".
- Problem link: https://www.acmicpc.net/problem/10546
- Solution link: http://www.teferi.net/ps/problems/boj/10546
"""
import collections
import sys
def main():
N = int(sys.stdin.readline())
counter = collections.Counter(x.rstrip() for x in sys.stdin)
answer = next(x for x, count in counter.items() if count % 2 == 1)
print(answer)
if __name__ == '__main__':
main()