結果
問題 | No.1686 Geschenkt |
ユーザー |
|
提出日時 | 2022-01-19 20:31:05 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 33 ms / 2,000 ms |
コード長 | 266 bytes |
コンパイル時間 | 206 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-11-23 14:02:50 |
合計ジャッジ時間 | 1,156 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
N = int(input()) A = list(map(int, input().split())) lst = [True] * 100 for a in A: lst[a] = False ans = 0 for i in range(max(A) - 1, min(A) - 2, -1): # print(f"idx = {i}") if lst[i] and not lst[i + 1]: # print(i) ans += i + 1 print(ans)