結果

問題 No.1219 Mancala Combo
ユーザー kohei2019kohei2019
提出日時 2022-07-19 22:16:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 305 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 87,028 KB
実行使用メモリ 108,464 KB
最終ジャッジ日時 2023-09-14 19:12:36
合計ジャッジ時間 5,467 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,184 KB
testcase_01 AC 72 ms
71,176 KB
testcase_02 AC 78 ms
71,136 KB
testcase_03 AC 71 ms
71,352 KB
testcase_04 AC 71 ms
71,404 KB
testcase_05 AC 72 ms
71,348 KB
testcase_06 AC 72 ms
71,392 KB
testcase_07 AC 72 ms
71,264 KB
testcase_08 AC 69 ms
71,108 KB
testcase_09 AC 75 ms
71,404 KB
testcase_10 AC 72 ms
71,416 KB
testcase_11 AC 72 ms
71,376 KB
testcase_12 AC 69 ms
71,452 KB
testcase_13 AC 71 ms
71,416 KB
testcase_14 AC 71 ms
71,300 KB
testcase_15 AC 70 ms
71,220 KB
testcase_16 AC 72 ms
71,396 KB
testcase_17 AC 106 ms
97,508 KB
testcase_18 AC 108 ms
98,232 KB
testcase_19 AC 99 ms
94,824 KB
testcase_20 AC 111 ms
100,804 KB
testcase_21 AC 97 ms
92,496 KB
testcase_22 AC 105 ms
95,328 KB
testcase_23 AC 110 ms
103,672 KB
testcase_24 AC 102 ms
93,124 KB
testcase_25 AC 98 ms
94,640 KB
testcase_26 AC 107 ms
98,124 KB
testcase_27 AC 113 ms
107,416 KB
testcase_28 AC 121 ms
108,464 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
lsA = [0]+list(map(int,input().split()))
add = 0
for i in range(N):
    if lsA[i] > i:
        print('No')
        exit()
for i in range(N,0,-1):
    if (lsA[i]+add) % i == 0:  
        add += (lsA[i]+add) // i
        lsA[i] = 0
    else:
        print('No')
        exit()
print('Yes')
0