結果

問題 No.1219 Mancala Combo
ユーザー persimmon-persimmon
提出日時 2021-06-29 11:23:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 94 ms / 2,000 ms
コード長 198 bytes
コンパイル時間 183 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 105,792 KB
最終ジャッジ日時 2024-06-25 17:28:59
合計ジャッジ時間 3,318 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))
tmp=0
for i in reversed(range(n)):
  if a[i]<=i+1 and (a[i]+tmp)%(i+1)==0:
    tmp+=(a[i]+tmp)//(i+1)
  else:
    print('No')
    exit()
print('Yes')
0