結果

問題 No.688 E869120 and Constructing Array 2
ユーザー るさるさ
提出日時 2018-05-31 22:27:35
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 349 bytes
コンパイル時間 142 ms
コンパイル使用メモリ 10,760 KB
実行使用メモリ 8,132 KB
最終ジャッジ日時 2023-09-21 20:45:18
合計ジャッジ時間 2,428 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
7,904 KB
testcase_01 AC 17 ms
7,908 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 16 ms
7,928 KB
testcase_08 WA -
testcase_09 AC 17 ms
7,876 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

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