結果

問題 No.1219 Mancala Combo
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2020-09-04 23:31:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 200 ms / 2,000 ms
コード長 245 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 30,556 KB
最終ジャッジ日時 2024-05-05 03:42:27
合計ジャッジ時間 3,120 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,752 KB
testcase_01 AC 28 ms
10,752 KB
testcase_02 AC 28 ms
10,624 KB
testcase_03 AC 29 ms
10,624 KB
testcase_04 AC 28 ms
10,880 KB
testcase_05 AC 29 ms
10,752 KB
testcase_06 AC 28 ms
10,752 KB
testcase_07 AC 27 ms
10,752 KB
testcase_08 AC 27 ms
10,752 KB
testcase_09 AC 28 ms
10,752 KB
testcase_10 AC 29 ms
10,752 KB
testcase_11 AC 27 ms
10,752 KB
testcase_12 AC 29 ms
10,880 KB
testcase_13 AC 29 ms
10,752 KB
testcase_14 AC 27 ms
10,752 KB
testcase_15 AC 27 ms
10,752 KB
testcase_16 AC 28 ms
10,752 KB
testcase_17 AC 69 ms
21,252 KB
testcase_18 AC 148 ms
24,556 KB
testcase_19 AC 63 ms
20,004 KB
testcase_20 AC 144 ms
25,216 KB
testcase_21 AC 59 ms
18,712 KB
testcase_22 AC 129 ms
23,176 KB
testcase_23 AC 75 ms
23,432 KB
testcase_24 AC 113 ms
21,604 KB
testcase_25 AC 64 ms
19,776 KB
testcase_26 AC 148 ms
24,544 KB
testcase_27 AC 87 ms
25,380 KB
testcase_28 AC 200 ms
30,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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