結果

問題 No.688 E869120 and Constructing Array 2
ユーザー るさ
提出日時 2018-05-31 22:27:35
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 349 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-07-07 14:09:54
合計ジャッジ時間 2,286 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 4 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
n=int(input())
b=0
while True:
    if (n%2==0)& n!=0:
        b+=1
        n=int(n/2)
    else:
        break
a=30
while True:
    if n%(a*(a-1)/2)==0:
        break
    else:
        a-=1
if n==0:
    a=1
else:
    n=int(n/(a*(a-1)/2))
put=""
for i in range(a):
    put+="1 "
for i in range(b):
    put+="0 "
print(a+b)
print(put[:-1])
0