結果

問題 No.1219 Mancala Combo
ユーザー もりをもりを
提出日時 2020-09-04 21:30:18
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 213 ms / 2,000 ms
コード長 312 bytes
コンパイル時間 331 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 30,424 KB
最終ジャッジ日時 2024-11-26 11:58:46
合計ジャッジ時間 3,253 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

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