結果

問題 No.2126 MEX Game
ユーザー terasa
提出日時 2022-11-22 12:44:11
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 597 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 82,064 KB
実行使用メモリ 103,044 KB
最終ジャッジ日時 2024-09-22 21:50:54
合計ジャッジ時間 4,067 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

from typing import List, Tuple, Callable, TypeVar
import sys
import itertools
import heapq
import bisect
import math
from collections import deque, defaultdict, Counter
from functools import lru_cache, cmp_to_key

input = sys.stdin.readline

if __file__ != 'prog.py':
    sys.setrecursionlimit(10 ** 6)


def readints(): return map(int, input().split())
def readlist(): return list(readints())
def readstr(): return input()[:-1]


N = int(input())
A = readlist()

cnt = defaultdict(int)
for a in A:
    cnt[a] += 1

for i in range(10 ** 5 + 10):
    if cnt[i] <= 1:
        print(i)
        break
0