結果

問題 No.1686 Geschenkt
ユーザー nephrologistnephrologist
提出日時 2021-09-25 12:14:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 137 bytes
コンパイル時間 601 ms
コンパイル使用メモリ 87,020 KB
実行使用メモリ 71,564 KB
最終ジャッジ日時 2023-09-18 22:59:34
合計ジャッジ時間 1,963 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,548 KB
testcase_01 AC 68 ms
71,064 KB
testcase_02 AC 69 ms
71,564 KB
testcase_03 AC 67 ms
71,264 KB
testcase_04 AC 69 ms
71,368 KB
testcase_05 AC 68 ms
71,520 KB
testcase_06 AC 68 ms
71,288 KB
testcase_07 AC 69 ms
71,328 KB
testcase_08 AC 67 ms
71,096 KB
testcase_09 AC 67 ms
71,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

memo=set(A)
ans=0
for a in A:
    if a-1 in memo:
        continue
    ans+=a
print(ans)
0