結果

問題 No.1219 Mancala Combo
ユーザー tonyu0tonyu0
提出日時 2020-09-04 21:53:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 205 ms / 2,000 ms
コード長 278 bytes
コンパイル時間 73 ms
コンパイル使用メモリ 10,736 KB
実行使用メモリ 30,992 KB
最終ジャッジ日時 2023-08-17 15:31:59
合計ジャッジ時間 2,758 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,828 KB
testcase_01 AC 14 ms
8,104 KB
testcase_02 AC 14 ms
7,844 KB
testcase_03 AC 15 ms
7,784 KB
testcase_04 AC 15 ms
7,788 KB
testcase_05 AC 14 ms
8,196 KB
testcase_06 AC 14 ms
7,960 KB
testcase_07 AC 15 ms
8,196 KB
testcase_08 AC 15 ms
7,828 KB
testcase_09 AC 14 ms
8,292 KB
testcase_10 AC 15 ms
7,884 KB
testcase_11 AC 15 ms
8,156 KB
testcase_12 AC 15 ms
7,892 KB
testcase_13 AC 15 ms
8,260 KB
testcase_14 AC 15 ms
8,024 KB
testcase_15 AC 15 ms
8,012 KB
testcase_16 AC 15 ms
7,856 KB
testcase_17 AC 53 ms
20,104 KB
testcase_18 AC 147 ms
23,404 KB
testcase_19 AC 49 ms
18,656 KB
testcase_20 AC 149 ms
25,000 KB
testcase_21 AC 44 ms
17,592 KB
testcase_22 AC 129 ms
22,564 KB
testcase_23 AC 60 ms
22,760 KB
testcase_24 AC 111 ms
20,148 KB
testcase_25 AC 48 ms
18,108 KB
testcase_26 AC 145 ms
23,116 KB
testcase_27 AC 69 ms
24,880 KB
testcase_28 AC 205 ms
30,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, *a = map(int, open(0).read().split())

cum = 0
for i in range(n - 1, 0, -1):
    if a[i] + cum == 0:
        continue
    if a[i] + cum >= i + 1 and (a[i] + cum) % (i + 1) == 0:
        cum += (a[i] + cum) // (i + 1)
    else:
        print('No')
        exit()
print('Yes')
0