結果
| 問題 |
No.929 よくあるボールを移動するやつ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-14 14:49:26 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 66 ms / 2,000 ms |
| コード長 | 165 bytes |
| コンパイル時間 | 465 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 79,488 KB |
| 最終ジャッジ日時 | 2024-07-23 00:19:35 |
| 合計ジャッジ時間 | 2,272 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)