結果
問題 | No.2126 MEX Game |
ユーザー |
👑 |
提出日時 | 2022-11-18 21:32:28 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 403 bytes |
コンパイル時間 | 159 ms |
コンパイル使用メモリ | 82,468 KB |
実行使用メモリ | 83,008 KB |
最終ジャッジ日時 | 2024-09-20 01:56:32 |
合計ジャッジ時間 | 2,548 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 WA * 1 |
ソースコード
n = int(input()) A = list(map(int, input().split())) cnt = [0] * (10 ** 5 + 1) for a in A: cnt[a] += 1 tot = 0 flg = False for i in range(10 ** 5): tot += min(cnt[i], 2) if cnt[i] == 0: print(i) break elif cnt[i] == 1: if flg: print(i) break if tot == n: print(i) break else: flg = True