結果

問題 No.1219 Mancala Combo
ユーザー FromBooskaFromBooska
提出日時 2023-10-16 13:11:46
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 653 bytes
コンパイル時間 453 ms
コンパイル使用メモリ 87,180 KB
実行使用メモリ 107,140 KB
最終ジャッジ日時 2023-10-16 13:11:52
合計ジャッジ時間 5,551 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,388 KB
testcase_01 AC 71 ms
71,588 KB
testcase_02 AC 70 ms
71,228 KB
testcase_03 AC 71 ms
71,372 KB
testcase_04 WA -
testcase_05 AC 71 ms
71,300 KB
testcase_06 WA -
testcase_07 AC 71 ms
71,088 KB
testcase_08 WA -
testcase_09 AC 70 ms
71,324 KB
testcase_10 WA -
testcase_11 AC 72 ms
71,392 KB
testcase_12 WA -
testcase_13 AC 72 ms
71,096 KB
testcase_14 AC 70 ms
71,432 KB
testcase_15 AC 73 ms
71,468 KB
testcase_16 WA -
testcase_17 AC 105 ms
96,608 KB
testcase_18 WA -
testcase_19 AC 99 ms
94,436 KB
testcase_20 WA -
testcase_21 AC 100 ms
92,052 KB
testcase_22 WA -
testcase_23 AC 112 ms
102,472 KB
testcase_24 WA -
testcase_25 AC 99 ms
94,060 KB
testcase_26 WA -
testcase_27 AC 116 ms
106,144 KB
testcase_28 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

# 右端の数字に着目
# 右端の数字がインデックスとマッチしていなければアウト
# そこから左に1つずつ動く、右端
# 右端からの歩数分だけの数がそこに降ってくる、そのそきに初期値と降ってくる数の和がそのインデックスの倍数必要か

N = int(input())
A = list(map(int, input().split()))

ans = 'Yes'
cumu = 0
start_counting = False
for i in range(N-1, -1, -1):
    if (A[i]+cumu)%(i+1)!=0:
        ans = 'No'
    if A[i] > 0:
        start_counting = True
    if start_counting == True:
        cumu += 1
    #print('ans', ans, start_counting, cumu)
print(ans)
    

0