結果

問題 No.1219 Mancala Combo
ユーザー Kiri8128Kiri8128
提出日時 2020-07-19 23:07:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 172 ms / 2,000 ms
コード長 307 bytes
コンパイル時間 127 ms
コンパイル使用メモリ 10,744 KB
実行使用メモリ 30,936 KB
最終ジャッジ日時 2023-08-16 01:56:49
合計ジャッジ時間 2,732 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
7,788 KB
testcase_01 AC 13 ms
7,820 KB
testcase_02 AC 13 ms
7,972 KB
testcase_03 AC 14 ms
7,804 KB
testcase_04 AC 13 ms
7,932 KB
testcase_05 AC 13 ms
7,772 KB
testcase_06 AC 12 ms
7,800 KB
testcase_07 AC 13 ms
7,820 KB
testcase_08 AC 13 ms
7,744 KB
testcase_09 AC 13 ms
7,892 KB
testcase_10 AC 14 ms
7,816 KB
testcase_11 AC 14 ms
7,840 KB
testcase_12 AC 14 ms
7,776 KB
testcase_13 AC 14 ms
7,788 KB
testcase_14 AC 17 ms
7,952 KB
testcase_15 AC 13 ms
7,772 KB
testcase_16 AC 13 ms
7,936 KB
testcase_17 AC 69 ms
20,052 KB
testcase_18 AC 126 ms
24,476 KB
testcase_19 AC 64 ms
18,728 KB
testcase_20 AC 132 ms
24,852 KB
testcase_21 AC 56 ms
17,600 KB
testcase_22 AC 108 ms
22,732 KB
testcase_23 AC 83 ms
23,588 KB
testcase_24 AC 105 ms
20,432 KB
testcase_25 AC 62 ms
18,284 KB
testcase_26 AC 119 ms
24,012 KB
testcase_27 AC 92 ms
24,888 KB
testcase_28 AC 172 ms
30,936 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