結果

問題 No.1219 Mancala Combo
ユーザー NatsubiSoganNatsubiSogan
提出日時 2020-09-26 18:59:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 158 ms / 2,000 ms
コード長 209 bytes
コンパイル時間 142 ms
コンパイル使用メモリ 10,700 KB
実行使用メモリ 30,844 KB
最終ジャッジ日時 2023-09-12 00:20:21
合計ジャッジ時間 4,384 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,920 KB
testcase_01 AC 16 ms
8,276 KB
testcase_02 AC 15 ms
7,748 KB
testcase_03 AC 16 ms
8,020 KB
testcase_04 AC 15 ms
7,860 KB
testcase_05 AC 16 ms
8,076 KB
testcase_06 AC 15 ms
7,984 KB
testcase_07 AC 16 ms
8,248 KB
testcase_08 AC 15 ms
7,832 KB
testcase_09 AC 16 ms
8,076 KB
testcase_10 AC 16 ms
7,824 KB
testcase_11 AC 16 ms
8,100 KB
testcase_12 AC 15 ms
7,916 KB
testcase_13 AC 15 ms
8,112 KB
testcase_14 AC 15 ms
8,100 KB
testcase_15 AC 15 ms
7,828 KB
testcase_16 AC 15 ms
7,884 KB
testcase_17 AC 55 ms
20,020 KB
testcase_18 AC 121 ms
24,408 KB
testcase_19 AC 51 ms
18,728 KB
testcase_20 AC 123 ms
24,840 KB
testcase_21 AC 46 ms
17,672 KB
testcase_22 AC 103 ms
22,740 KB
testcase_23 AC 64 ms
22,444 KB
testcase_24 AC 92 ms
20,440 KB
testcase_25 AC 49 ms
18,216 KB
testcase_26 AC 114 ms
23,860 KB
testcase_27 AC 71 ms
24,824 KB
testcase_28 AC 158 ms
30,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
cur = 0
for i in range(n)[::-1]:
    if (cur + a[i]) % (i + 1) == 0:
        cur += (cur + a[i]) // (i + 1)
    else:
        exit(print("No"))
print("Yes")
0