結果

問題 No.688 E869120 and Constructing Array 2
ユーザー www888
提出日時 2018-05-31 11:45:17
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 40 ms / 1,000 ms
コード長 234 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-07-07 14:09:33
合計ジャッジ時間 1,269 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

k= int(input())
if k == 0:
    print(1)
    print(0)
for n in range(2,31):
    for i in range(n+1):
        if i*(i-1)/2 * 2**(n-i) == k:
            print(n)
            print(" ".join(["0"]*(n-i)+["1"]*i))
            break
        
0