結果
| 問題 | No.929 よくあるボールを移動するやつ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-02-23 22:04:35 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 76 ms / 2,000 ms |
| + 775µs | |
| コード長 | 147 bytes |
| 記録 | |
| コンパイル時間 | 384 ms |
| コンパイル使用メモリ | 96,104 KB |
| 実行使用メモリ | 96,512 KB |
| 最終ジャッジ日時 | 2026-08-03 14:27:12 |
| 合計ジャッジ時間 | 2,867 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 12 |
ソースコード
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)