結果

問題 No.1219 Mancala Combo
ユーザー googol_S0googol_S0
提出日時 2020-09-04 22:13:30
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 340 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 102,656 KB
最終ジャッジ日時 2024-05-04 22:36:52
合計ジャッジ時間 2,412 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
52,224 KB
testcase_01 AC 33 ms
52,096 KB
testcase_02 AC 34 ms
51,968 KB
testcase_03 AC 35 ms
51,968 KB
testcase_04 WA -
testcase_05 AC 33 ms
51,584 KB
testcase_06 WA -
testcase_07 AC 33 ms
51,968 KB
testcase_08 WA -
testcase_09 AC 35 ms
51,712 KB
testcase_10 WA -
testcase_11 AC 34 ms
51,840 KB
testcase_12 WA -
testcase_13 AC 35 ms
51,968 KB
testcase_14 AC 33 ms
51,712 KB
testcase_15 AC 33 ms
52,224 KB
testcase_16 WA -
testcase_17 AC 62 ms
89,088 KB
testcase_18 WA -
testcase_19 AC 61 ms
85,248 KB
testcase_20 WA -
testcase_21 AC 56 ms
82,304 KB
testcase_22 WA -
testcase_23 AC 68 ms
96,128 KB
testcase_24 WA -
testcase_25 AC 59 ms
84,736 KB
testcase_26 WA -
testcase_27 AC 73 ms
101,888 KB
testcase_28 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
for i in range(len(A)):
  if A[-1]==0:
    del A[-1]
    N-=1
A=A[::-1]
if N==1:
  print('Yes')
  exit()
if N==2:
  if A[0]==1:
    print('No')
  else:
    print('Yes')
  exit()
C=0
for i in range(N):
  if (A[i]+C)%(N-i):
    print('No')
    exit()
  else:
    C+=(A[i]+C)//(N-1)
print('Yes')
0