結果
問題 | No.1219 Mancala Combo |
ユーザー |
|
提出日時 | 2020-09-27 17:21:15 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 121 ms / 2,000 ms |
コード長 | 312 bytes |
コンパイル時間 | 168 ms |
コンパイル使用メモリ | 82,512 KB |
実行使用メモリ | 113,816 KB |
最終ジャッジ日時 | 2024-06-30 12:47:00 |
合計ジャッジ時間 | 3,652 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 |
ソースコード
n=int(input()) *a,=map(int,input().split()) a=[0]+a for i in range(n+1): if i<a[i]: print('No') exit() from itertools import accumulate acc=list(accumulate(a)) modacc=[] for i in range(1,n+1): modacc.append((acc[-1]-acc[i-1])%i) if sum(modacc)==0: print('Yes') else: print('No')