結果
| 問題 | No.1686 Geschenkt |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-24 21:22:14 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 2,000 ms |
| コード長 | 137 bytes |
| 記録 | |
| コンパイル時間 | 333 ms |
| コンパイル使用メモリ | 85,376 KB |
| 実行使用メモリ | 52,096 KB |
| 最終ジャッジ日時 | 2026-03-26 17:00:26 |
| 合計ジャッジ時間 | 1,273 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
n=int(input())
A=list(map(int,input().split()))
A.sort()
ans=A[0]
for i in range(1,n):
if A[i]>A[i-1]+1:
ans+=A[i]
print(ans)