結果

問題 No.688 E869120 and Constructing Array 2
ユーザー posaune-0xa0
提出日時 2018-06-24 01:34:05
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 293 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-07-07 14:19:20
合計ジャッジ時間 1,152 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

K = int(input())
if K == 0:
    print('0\n0')
else:
    for t in range(1, 31):
        tri = t*(t+1)//2
        if K%tri == 0 and bin(K//tri).count('1') == 1:
            zero = bin(K//tri).count('0') - 1
            print(t+1+zero)
            print("1 "*(t+1) + "0 "*zero)
            break
0