結果
問題 | No.1686 Geschenkt |
ユーザー |
|
提出日時 | 2021-12-28 20:35:49 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 39 ms / 2,000 ms |
コード長 | 194 bytes |
コンパイル時間 | 387 ms |
コンパイル使用メモリ | 82,068 KB |
実行使用メモリ | 53,440 KB |
最終ジャッジ日時 | 2024-10-02 14:49:44 |
合計ジャッジ時間 | 1,317 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
N = int(input())a = list(map(int, input().split()))a = sorted(a)ans = a[0]if len(a) > 1:for i in range(1, len(a)):if a[i] - 1 != a[i - 1]:ans += a[i]print(ans)