結果

問題 No.688 E869120 and Constructing Array 2
コンテスト
ユーザー daku9640
提出日時 2018-05-18 23:09:36
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 403 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 368 ms
コンパイル使用メモリ 20,952 KB
実行使用メモリ 15,612 KB
最終ジャッジ日時 2026-03-29 04:07:15
合計ジャッジ時間 3,180 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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