結果
| 問題 |
No.1219 Mancala Combo
|
| コンテスト | |
| ユーザー |
anagohirame
|
| 提出日時 | 2020-06-26 14:16:25 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 177 ms / 2,000 ms |
| コード長 | 376 bytes |
| コンパイル時間 | 149 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 30,564 KB |
| 最終ジャッジ日時 | 2024-11-24 11:13:07 |
| 合計ジャッジ時間 | 3,430 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
n = int(input())
a = list(map(int, input().split()))
#マスi+1〜マスNまでを選んだ総回数=マスiに追加される石の数
total = 0
#フラグ
ok = True
for i in range(n-1, -1, -1):
if (a[i] + total) % (i+1) == 0:#マスiを空にできる
total += (a[i] + total) // (i+1)
else:#空にできない→NG
ok = False
break
print("Yes" if ok else "No")
anagohirame