結果

問題 No.1686 Geschenkt
ユーザー brthyyjpbrthyyjp
提出日時 2021-09-24 21:22:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 168 bytes
コンパイル時間 266 ms
コンパイル使用メモリ 87,172 KB
実行使用メモリ 71,816 KB
最終ジャッジ日時 2023-09-18 20:32:09
合計ジャッジ時間 1,999 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
71,456 KB
testcase_01 AC 98 ms
71,592 KB
testcase_02 AC 97 ms
71,816 KB
testcase_03 AC 96 ms
71,728 KB
testcase_04 AC 97 ms
71,548 KB
testcase_05 AC 97 ms
71,720 KB
testcase_06 AC 97 ms
71,540 KB
testcase_07 AC 97 ms
71,460 KB
testcase_08 AC 96 ms
71,700 KB
testcase_09 AC 97 ms
71,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int, input().split()))
from collections import Counter
C = Counter(A)
ans = 0
for a in A:
    if C[a-1] == 0:
        ans += a
print(ans)
0