結果
| 問題 |
No.688 E869120 and Constructing Array 2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-06-24 01:36:09 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 1,000 ms |
| コード長 | 293 bytes |
| コンパイル時間 | 150 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-07-07 14:19:26 |
| 合計ジャッジ時間 | 1,072 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
K = int(input())
if K == 0:
print('1\n0')
else:
for t in range(1, 31):
tri = t*(t+1)//2
if K%tri == 0 and bin(K//tri).count('1') == 1:
zero = bin(K//tri).count('0') - 1
print(t+1+zero)
print("1 "*(t+1) + "0 "*zero)
break