結果
問題 |
No.688 E869120 and Constructing Array 2
|
ユーザー |
|
提出日時 | 2018-05-18 23:24:07 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 401 bytes |
コンパイル時間 | 83 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-07 13:39:15 |
合計ジャッジ時間 | 1,291 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 1 |
ソースコード
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, 31): for j in range(2, 31 - i): if (1 << i) * c(j, 2) == k: print(i + j) return [0] * i + [1] * j return [0] print(*solve())