結果

問題 No.688 E869120 and Constructing Array 2
ユーザー htkbhtkb
提出日時 2018-05-19 11:27:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 268 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 10,608 KB
実行使用メモリ 8,356 KB
最終ジャッジ日時 2023-09-21 20:31:35
合計ジャッジ時間 2,432 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

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