結果
| 問題 |
No.2126 MEX Game
|
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2022-11-18 21:55:39 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 347 bytes |
| コンパイル時間 | 158 ms |
| コンパイル使用メモリ | 82,372 KB |
| 実行使用メモリ | 102,664 KB |
| 最終ジャッジ日時 | 2024-09-20 02:18:31 |
| 合計ジャッジ時間 | 2,835 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 WA * 12 |
ソースコード
def mex(S):
x=0
while x in S:
x+=1
return x
def solve():
from collections import Counter
N=int(input())
A=list(map(int,input().split()))
CA=Counter(A)
S=set()
for a in CA:
if CA[a]>=2:
S.add(a)
return mex(S)
#==================================================
print(solve())
Kazun