結果
問題 |
No.929 よくあるボールを移動するやつ
|
ユーザー |
|
提出日時 | 2022-02-23 22:04:35 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 61 ms / 2,000 ms |
コード長 | 147 bytes |
コンパイル時間 | 175 ms |
コンパイル使用メモリ | 82,064 KB |
実行使用メモリ | 80,004 KB |
最終ジャッジ日時 | 2024-07-01 22:39:08 |
合計ジャッジ時間 | 2,273 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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)