사용자 도구

사이트 도구


ps:problems:boj:10546

배부른 마라토너

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()

토론

댓글을 입력하세요:
A F D H H
 
ps/problems/boj/10546.txt · 마지막으로 수정됨: 2022/05/03 09:43 저자 teferi