結果

問題 No.1219 Mancala Combo
ユーザー Kiri8128Kiri8128
提出日時 2020-07-19 23:07:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 231 ms / 2,000 ms
コード長 307 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 30,444 KB
最終ジャッジ日時 2024-05-03 11:45:15
合計ジャッジ時間 3,365 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,880 KB
testcase_01 AC 29 ms
10,752 KB
testcase_02 AC 31 ms
10,624 KB
testcase_03 AC 29 ms
10,752 KB
testcase_04 AC 30 ms
10,752 KB
testcase_05 AC 30 ms
10,752 KB
testcase_06 AC 29 ms
10,624 KB
testcase_07 AC 30 ms
10,880 KB
testcase_08 AC 29 ms
10,752 KB
testcase_09 AC 29 ms
10,752 KB
testcase_10 AC 29 ms
10,624 KB
testcase_11 AC 29 ms
10,624 KB
testcase_12 AC 28 ms
10,624 KB
testcase_13 AC 29 ms
10,880 KB
testcase_14 AC 30 ms
10,880 KB
testcase_15 AC 29 ms
10,752 KB
testcase_16 AC 29 ms
10,752 KB
testcase_17 AC 112 ms
21,272 KB
testcase_18 AC 178 ms
24,568 KB
testcase_19 AC 101 ms
20,020 KB
testcase_20 AC 179 ms
25,104 KB
testcase_21 AC 91 ms
19,008 KB
testcase_22 AC 160 ms
23,456 KB
testcase_23 AC 128 ms
23,580 KB
testcase_24 AC 137 ms
21,364 KB
testcase_25 AC 98 ms
19,920 KB
testcase_26 AC 174 ms
24,560 KB
testcase_27 AC 146 ms
25,272 KB
testcase_28 AC 231 ms
30,444 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = [0] + [int(a) for a in input().split()]
assert 1 <= N <= 2 * 10 ** 5
assert len(A) == N + 1
for i, a in enumerate(A):
    assert 0 <= a <= i

s = 0
for i in range(1, N + 1)[::-1]:
    A[i] += s
    if A[i] % i:
        print("No")
        break
    s += A[i] // i
else:
    print("Yes")
0