結果

問題 No.688 E869120 and Constructing Array 2
ユーザー nebukuro09
提出日時 2018-05-18 22:35:36
言語 PyPy2
(7.3.15)
結果
MLE  
実行時間 -
コード長 286 bytes
コンパイル時間 1,422 ms
コンパイル使用メモリ 76,672 KB
実行使用メモリ 391,436 KB
最終ジャッジ日時 2024-07-07 13:25:57
合計ジャッジ時間 5,152 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 3
other AC * 9 MLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

K = input()
A = [1, 1]
x = 2
S = set()
for i in xrange(60):
    S.add(2**i)

while True:
    y = x * (x - 1) / 2
    if K % y == 0 and K / y in S:
        K /= y
        break
    A.append(1)
    x += 1

while K > 1:
    A.append(0)
    K /= 2

print len(A)
print ' '.join(map(str, A))
0