結果
| 問題 | No.929 よくあるボールを移動するやつ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-14 14:49:26 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 77 ms / 2,000 ms |
| + 370µs | |
| コード長 | 165 bytes |
| 記録 | |
| コンパイル時間 | 232 ms |
| コンパイル使用メモリ | 95,972 KB |
| 実行使用メモリ | 97,152 KB |
| 最終ジャッジ日時 | 2026-08-23 15:27:31 |
| 合計ジャッジ時間 | 2,854 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 12 |
ソースコード
N = int(input())
lsB = list(map(int,input().split()))
lsB0 = [b-1 for b in lsB]
ans = 0
cnt = 0
for i in range(N):
cnt += lsB0[i]
ans += abs(cnt)
print(ans)