結果
問題 | No.688 E869120 and Constructing Array 2 |
ユーザー |
![]() |
提出日時 | 2018-08-04 05:55:30 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 30 ms / 1,000 ms |
コード長 | 435 bytes |
コンパイル時間 | 81 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-09-19 17:45:03 |
合計ジャッジ時間 | 1,141 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
K = int(input()) def cnst_b(K:int) -> None: if K==0: print(1) print(0) else: for one in range(2,31): for zero in range(0, 31-one): if one*(one-1)*(2**zero) == 2*K: o = one z = zero st = "0"*z + "1"*o s = [int(a) for a in st] print(len(s)) print(*s) cnst_b(K)