結果

問題 No.1686 Geschenkt
ユーザー pypypymipypypymi
提出日時 2021-12-21 09:48:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 175 bytes
コンパイル時間 613 ms
コンパイル使用メモリ 87,172 KB
実行使用メモリ 71,412 KB
最終ジャッジ日時 2023-10-13 19:47:51
合計ジャッジ時間 2,507 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,152 KB
testcase_01 AC 79 ms
71,308 KB
testcase_02 AC 77 ms
71,228 KB
testcase_03 AC 76 ms
71,172 KB
testcase_04 AC 78 ms
71,208 KB
testcase_05 AC 82 ms
71,312 KB
testcase_06 AC 78 ms
71,256 KB
testcase_07 AC 75 ms
71,356 KB
testcase_08 AC 77 ms
71,412 KB
testcase_09 AC 78 ms
71,164 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
an = (sorted(map(int,input().split())))
result = [an[0]]
for i in range(1,len(an)):
    if an[i-1]!=an[i]-1:
        result.append(an[i])
print(sum(result))

0