結果
問題 |
No.2126 MEX Game
|
ユーザー |
![]() |
提出日時 | 2025-06-12 14:46:46 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 395 bytes |
コンパイル時間 | 163 ms |
コンパイル使用メモリ | 82,716 KB |
実行使用メモリ | 99,944 KB |
最終ジャッジ日時 | 2025-06-12 14:48:24 |
合計ジャッジ時間 | 3,128 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 WA * 14 |
ソースコード
import sys from collections import defaultdict def main(): input = sys.stdin.read().split() n = int(input[0]) A = list(map(int, input[1:n+1])) count = defaultdict(int) for num in A: count[num] += 1 m = 0 while True: if count[m] >= m + 1: m += 1 else: break print(m) if __name__ == "__main__": main()