結果

問題 No.1376 Simple LPS Problem
ユーザー googol_S0googol_S0
提出日時 2021-02-05 21:42:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 352 bytes
コンパイル時間 2,301 ms
コンパイル使用メモリ 86,672 KB
実行使用メモリ 71,912 KB
最終ジャッジ日時 2023-09-15 07:32:00
合計ジャッジ時間 12,171 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 71 ms
71,308 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 71 ms
70,836 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 73 ms
71,132 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 72 ms
71,112 KB
testcase_13 AC 71 ms
71,116 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 71 ms
71,164 KB
testcase_18 AC 71 ms
71,100 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 72 ms
71,108 KB
testcase_24 AC 71 ms
71,284 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 72 ms
71,312 KB
testcase_29 AC 73 ms
71,120 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 71 ms
71,236 KB
testcase_35 AC 72 ms
71,312 KB
testcase_36 AC 73 ms
70,976 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 AC 72 ms
70,952 KB
testcase_42 WA -
testcase_43 WA -
testcase_44 AC 71 ms
71,108 KB
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 WA -
testcase_52 WA -
testcase_53 WA -
testcase_54 WA -
testcase_55 AC 71 ms
71,380 KB
testcase_56 AC 72 ms
71,240 KB
testcase_57 AC 73 ms
71,364 KB
testcase_58 WA -
testcase_59 WA -
testcase_60 AC 71 ms
71,312 KB
testcase_61 AC 72 ms
71,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
M=N
if K*2>=N:
  print(('0'*K)+('1'*(N-K)))
X=[]
C=0
while K:
  X.append(K)
  if len(X)>1:
    X[-1]-=1
  if len(X)>2:
    X[-2]-=1
    N+=1
  N-=X[-1]
  if N<0:
    X[-1]-=N
  if N<0 or X[-1]<=0:
    break
  C+=1
  if C&1==0:
    K-=1
if sum(X)<M:
  print(-1)
else:
  print(''.join([str(i&1)*X[i] for i in range(len(X))]))
0