結果

問題 No.1219 Mancala Combo
ユーザー tikitaka1201tikitaka1201
提出日時 2020-09-27 17:21:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 154 ms / 2,000 ms
コード長 312 bytes
コンパイル時間 996 ms
コンパイル使用メモリ 87,260 KB
実行使用メモリ 126,808 KB
最終ジャッジ日時 2023-09-13 02:06:17
合計ジャッジ時間 6,672 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,560 KB
testcase_01 AC 69 ms
71,612 KB
testcase_02 AC 70 ms
71,556 KB
testcase_03 AC 77 ms
71,648 KB
testcase_04 AC 74 ms
71,572 KB
testcase_05 AC 69 ms
71,496 KB
testcase_06 AC 70 ms
71,424 KB
testcase_07 AC 70 ms
71,608 KB
testcase_08 AC 70 ms
71,232 KB
testcase_09 AC 67 ms
71,484 KB
testcase_10 AC 67 ms
71,176 KB
testcase_11 AC 69 ms
71,524 KB
testcase_12 AC 66 ms
71,372 KB
testcase_13 AC 69 ms
71,348 KB
testcase_14 AC 67 ms
71,548 KB
testcase_15 AC 70 ms
71,564 KB
testcase_16 AC 69 ms
71,552 KB
testcase_17 AC 125 ms
106,356 KB
testcase_18 AC 121 ms
104,700 KB
testcase_19 AC 117 ms
106,588 KB
testcase_20 AC 125 ms
106,020 KB
testcase_21 AC 111 ms
102,780 KB
testcase_22 AC 116 ms
106,560 KB
testcase_23 AC 135 ms
108,564 KB
testcase_24 AC 110 ms
102,940 KB
testcase_25 AC 116 ms
106,468 KB
testcase_26 AC 120 ms
105,876 KB
testcase_27 AC 154 ms
124,136 KB
testcase_28 AC 150 ms
126,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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')
0