結果

問題 No.929 よくあるボールを移動するやつ
ユーザー ああいいああいい
提出日時 2022-02-23 22:04:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 147 bytes
コンパイル時間 309 ms
コンパイル使用メモリ 86,932 KB
実行使用メモリ 88,976 KB
最終ジャッジ日時 2023-09-14 15:27:17
合計ジャッジ時間 3,048 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,260 KB
testcase_01 AC 69 ms
71,000 KB
testcase_02 AC 71 ms
71,372 KB
testcase_03 AC 75 ms
71,160 KB
testcase_04 AC 70 ms
71,140 KB
testcase_05 AC 70 ms
71,388 KB
testcase_06 AC 70 ms
71,400 KB
testcase_07 AC 82 ms
79,580 KB
testcase_08 AC 92 ms
88,908 KB
testcase_09 AC 91 ms
88,976 KB
testcase_10 AC 91 ms
88,664 KB
testcase_11 AC 90 ms
88,900 KB
testcase_12 AC 86 ms
88,752 KB
testcase_13 AC 90 ms
88,776 KB
testcase_14 AC 89 ms
88,764 KB
testcase_15 AC 91 ms
88,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
B = list(map(int,input().split()))

now = 0
ans = 0
for i in range(N):
    now -= 1
    now += B[i]
    ans += abs(now)
print(ans)
0