結果
| 問題 |
No.2126 MEX Game
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 19:57:39 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 395 bytes |
| コンパイル時間 | 281 ms |
| コンパイル使用メモリ | 82,560 KB |
| 実行使用メモリ | 98,688 KB |
| 最終ジャッジ日時 | 2025-06-12 20:00:17 |
| 合計ジャッジ時間 | 3,323 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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()
gew1fw