結果

問題 No.688 E869120 and Constructing Array 2
ユーザー daku9640daku9640
提出日時 2018-05-18 23:09:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 403 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 10,628 KB
実行使用メモリ 8,376 KB
最終ジャッジ日時 2023-09-21 20:03:42
合計ジャッジ時間 2,658 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations
from math import factorial
c = lambda y, x: factorial(y) // factorial(x) // factorial(y - x)
def solve():
    k = int(input())
    if k == 0:
        return [0]
    if k == 1:
        return [1, 1]
    for i in range(0, 30):
        for j in range(2, 30):
            if (1 << i) * c(j, 2) == k:
                return [0] * i + [1] * j
    return [0]
print(*solve())
0