結果
問題 | No.2126 MEX Game |
ユーザー |
![]() |
提出日時 | 2022-12-03 20:40:57 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 414 bytes |
コンパイル時間 | 157 ms |
コンパイル使用メモリ | 82,660 KB |
実行使用メモリ | 99,668 KB |
最終ジャッジ日時 | 2024-10-11 00:15:33 |
合計ジャッジ時間 | 3,366 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 8 |
ソースコード
import sysinput = sys.stdin.readlinefrom collections import *N = int(input())A = list(map(int, input().split()))cnt = Counter(A)flag = Falsefor i in range(10**5+10):if cnt[i]>=2:if cnt[i]>=3:flag = Trueelif cnt[i]==1:if not flag:print(i)breakelse:print(i+1)breakelse:print(i)break