結果

問題 No.2126 MEX Game
ユーザー lloyzlloyz
提出日時 2022-11-18 22:39:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 415 bytes
コンパイル時間 355 ms
コンパイル使用メモリ 11,864 KB
実行使用メモリ 24,864 KB
最終ジャッジ日時 2023-10-20 07:36:57
合計ジャッジ時間 3,257 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
10,036 KB
testcase_01 AC 54 ms
10,036 KB
testcase_02 AC 54 ms
10,036 KB
testcase_03 AC 54 ms
10,036 KB
testcase_04 AC 55 ms
10,036 KB
testcase_05 WA -
testcase_06 AC 54 ms
10,036 KB
testcase_07 AC 56 ms
10,036 KB
testcase_08 AC 54 ms
10,036 KB
testcase_09 AC 54 ms
10,036 KB
testcase_10 AC 111 ms
21,548 KB
testcase_11 AC 109 ms
21,548 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 100 ms
21,532 KB
testcase_16 AC 97 ms
21,408 KB
testcase_17 AC 91 ms
20,852 KB
testcase_18 AC 94 ms
21,596 KB
testcase_19 AC 78 ms
11,832 KB
testcase_20 AC 79 ms
11,832 KB
testcase_21 WA -
testcase_22 AC 56 ms
10,036 KB
testcase_23 AC 54 ms
10,036 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 54 ms
10,036 KB
testcase_27 AC 54 ms
10,036 KB
testcase_28 WA -
testcase_29 AC 55 ms
10,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

n = int(input())
A = list(map(int, input().split()))
counter = Counter(A)

more2_num = 0
for i in range(10**5 + 1):
    if counter[i] > 2:
        more2_num += 1
for i in range(10**5 + 1):
    if counter[i] >= 2:
        continue
    if counter[i] == 1:
        if more2_num > 0:
            more2_num -= 1
            continue
        print(i)
        break
    print(i)
    break
0