結果

問題 No.2335 Jump
ユーザー i_takui_taku
提出日時 2023-06-02 21:32:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 104 ms / 2,000 ms
コード長 162 bytes
コンパイル時間 991 ms
コンパイル使用メモリ 86,824 KB
実行使用メモリ 91,956 KB
最終ジャッジ日時 2023-08-28 02:49:10
合計ジャッジ時間 4,214 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,160 KB
testcase_01 AC 71 ms
71,120 KB
testcase_02 AC 70 ms
71,292 KB
testcase_03 AC 70 ms
71,204 KB
testcase_04 AC 71 ms
71,236 KB
testcase_05 AC 70 ms
71,348 KB
testcase_06 AC 70 ms
71,144 KB
testcase_07 AC 70 ms
71,292 KB
testcase_08 AC 72 ms
71,088 KB
testcase_09 AC 74 ms
71,416 KB
testcase_10 AC 71 ms
71,196 KB
testcase_11 AC 72 ms
70,940 KB
testcase_12 AC 104 ms
91,784 KB
testcase_13 AC 97 ms
91,880 KB
testcase_14 AC 96 ms
91,884 KB
testcase_15 AC 95 ms
91,956 KB
testcase_16 AC 95 ms
91,824 KB
testcase_17 AC 93 ms
90,712 KB
testcase_18 AC 96 ms
91,756 KB
testcase_19 AC 95 ms
91,812 KB
testcase_20 AC 92 ms
91,056 KB
testcase_21 AC 94 ms
91,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))[::-1]
ans = 0
for i in range(N - 1):
    ans += A[i] - A[i + 1]
    A[i + 1] -= 1
ans += A[-1] - 1
print(ans)
0