結果

問題 No.1219 Mancala Combo
ユーザー rlangevinrlangevin
提出日時 2023-02-23 22:56:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 294 bytes
コンパイル時間 331 ms
コンパイル使用メモリ 86,876 KB
実行使用メモリ 106,904 KB
最終ジャッジ日時 2023-09-30 22:22:50
合計ジャッジ時間 4,270 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,552 KB
testcase_01 AC 75 ms
71,304 KB
testcase_02 AC 77 ms
71,044 KB
testcase_03 AC 76 ms
71,408 KB
testcase_04 AC 75 ms
71,208 KB
testcase_05 AC 76 ms
71,180 KB
testcase_06 AC 75 ms
71,328 KB
testcase_07 AC 74 ms
71,316 KB
testcase_08 AC 75 ms
71,048 KB
testcase_09 AC 76 ms
71,264 KB
testcase_10 AC 77 ms
71,268 KB
testcase_11 AC 75 ms
71,392 KB
testcase_12 AC 76 ms
71,184 KB
testcase_13 AC 74 ms
71,300 KB
testcase_14 AC 76 ms
71,044 KB
testcase_15 AC 75 ms
71,496 KB
testcase_16 AC 75 ms
71,188 KB
testcase_17 AC 105 ms
96,440 KB
testcase_18 AC 109 ms
97,140 KB
testcase_19 AC 100 ms
93,872 KB
testcase_20 AC 114 ms
99,568 KB
testcase_21 AC 98 ms
91,636 KB
testcase_22 AC 107 ms
94,500 KB
testcase_23 AC 110 ms
102,448 KB
testcase_24 AC 105 ms
91,984 KB
testcase_25 AC 104 ms
93,784 KB
testcase_26 AC 111 ms
96,944 KB
testcase_27 AC 116 ms
106,028 KB
testcase_28 AC 124 ms
106,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
for i in range(N):
    if A[i] > i + 1:
        print("No")
        exit()
        
cnt = 0
for i in range(N - 1, -1, -1):
    if (cnt + A[i]) % (i + 1) != 0:
        print("No")
        exit()
    cnt += (A[i] + cnt) // (i + 1)
print("Yes")
0