結果

問題 No.1219 Mancala Combo
ユーザー もりをもりを
提出日時 2020-09-04 21:30:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 208 ms / 2,000 ms
コード長 312 bytes
コンパイル時間 234 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 30,552 KB
最終ジャッジ日時 2024-05-04 21:37:36
合計ジャッジ時間 3,150 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,624 KB
testcase_01 AC 24 ms
10,752 KB
testcase_02 AC 35 ms
10,624 KB
testcase_03 AC 26 ms
10,624 KB
testcase_04 AC 27 ms
10,624 KB
testcase_05 AC 25 ms
10,624 KB
testcase_06 AC 25 ms
10,752 KB
testcase_07 AC 25 ms
10,624 KB
testcase_08 AC 25 ms
10,624 KB
testcase_09 AC 25 ms
10,624 KB
testcase_10 AC 31 ms
10,624 KB
testcase_11 AC 27 ms
10,752 KB
testcase_12 AC 27 ms
10,752 KB
testcase_13 AC 25 ms
10,624 KB
testcase_14 AC 25 ms
10,624 KB
testcase_15 AC 25 ms
10,624 KB
testcase_16 AC 25 ms
10,752 KB
testcase_17 AC 65 ms
21,252 KB
testcase_18 AC 164 ms
24,680 KB
testcase_19 AC 62 ms
20,132 KB
testcase_20 AC 159 ms
25,216 KB
testcase_21 AC 56 ms
18,840 KB
testcase_22 AC 139 ms
23,184 KB
testcase_23 AC 73 ms
23,388 KB
testcase_24 AC 129 ms
21,480 KB
testcase_25 AC 61 ms
19,772 KB
testcase_26 AC 158 ms
24,416 KB
testcase_27 AC 82 ms
25,384 KB
testcase_28 AC 208 ms
30,552 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# URL : https://yukicoder.me/problems/no/1219
n = int(input())
a = list(map(int, input().split()))
mrg = 0
for i in range(n):
    idx = n - 1 - i
    need = n - i
    if (a[idx] + mrg) % need == 0:
        mrg += (a[idx] + mrg) // need
    elif a[idx] + mrg > 0:
        print('No')
        exit(0)
print('Yes')
0