結果

問題 No.688 E869120 and Constructing Array 2
ユーザー htkb
提出日時 2018-05-19 11:27:57
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 268 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-07 13:59:37
合計ジャッジ時間 1,853 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 5 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import factorial
K = int(input())
for i in range(2, 31):
    for j in range(i, 31):
        if factorial(i)//2//factorial(i-2) * 2**j == K:
            print(i+j)
            print(" ".join(["1"]*i+["0"]*j))
            exit()
else:
    print(1)
    print(0)
0