結果
| 問題 |
No.929 よくあるボールを移動するやつ
|
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-02-19 15:24:20 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 73 ms / 2,000 ms |
| コード長 | 186 bytes |
| コンパイル時間 | 167 ms |
| コンパイル使用メモリ | 82,564 KB |
| 実行使用メモリ | 85,120 KB |
| 最終ジャッジ日時 | 2024-09-16 04:37:35 |
| 合計ジャッジ時間 | 2,065 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 12 |
ソースコード
n = int(input())
*a, = map(int,input().split())
ans = R = 0
acc = a[0]
for L in range(n):
while R < n and acc < L+1:
R += 1
acc += a[R]
ans += abs(R-L)
print(ans)
convexineq