結果

問題 No.1219 Mancala Combo
ユーザー stnkienstnkien
提出日時 2020-09-04 22:51:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 191 ms / 2,000 ms
コード長 248 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 10,756 KB
実行使用メモリ 30,992 KB
最終ジャッジ日時 2023-08-17 20:30:27
合計ジャッジ時間 3,165 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,236 KB
testcase_01 AC 17 ms
8,232 KB
testcase_02 AC 16 ms
8,124 KB
testcase_03 AC 17 ms
8,264 KB
testcase_04 AC 17 ms
8,156 KB
testcase_05 AC 16 ms
8,144 KB
testcase_06 AC 16 ms
8,096 KB
testcase_07 AC 16 ms
8,228 KB
testcase_08 AC 16 ms
8,244 KB
testcase_09 AC 16 ms
8,064 KB
testcase_10 AC 16 ms
8,088 KB
testcase_11 AC 16 ms
8,240 KB
testcase_12 AC 16 ms
8,220 KB
testcase_13 AC 16 ms
8,144 KB
testcase_14 AC 16 ms
8,200 KB
testcase_15 AC 16 ms
8,096 KB
testcase_16 AC 16 ms
8,080 KB
testcase_17 AC 58 ms
20,080 KB
testcase_18 AC 140 ms
24,368 KB
testcase_19 AC 53 ms
18,780 KB
testcase_20 AC 145 ms
24,840 KB
testcase_21 AC 49 ms
17,612 KB
testcase_22 AC 123 ms
22,716 KB
testcase_23 AC 66 ms
23,704 KB
testcase_24 AC 108 ms
20,348 KB
testcase_25 AC 51 ms
18,196 KB
testcase_26 AC 135 ms
24,008 KB
testcase_27 AC 75 ms
24,812 KB
testcase_28 AC 191 ms
30,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import accumulate
N = int(input())
*A, = map(int, input().split())
C = [0]*N

for i in range(N-1, -1, -1):
    if (A[i] + C[i]) % (i+1) != 0:
        print('No')
        exit()
    C[i-1] = C[i] + (A[i] + C[i]) // (i+1)
print('Yes')
0