結果
| 問題 | No.688 E869120 and Constructing Array 2 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-12 16:11:13 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 398 bytes |
| 記録 | |
| コンパイル時間 | 310 ms |
| コンパイル使用メモリ | 85,632 KB |
| 実行使用メモリ | 52,224 KB |
| 最終ジャッジ日時 | 2026-04-06 00:30:01 |
| 合計ジャッジ時間 | 1,490 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 WA * 1 |
ソースコード
K = int(input())
if K == 0:
print(0)
exit()
for i in range(2,10**5+1):
if K < (i*(i-1) // 2):
break
if K % (i*(i-1) // 2) == 0:
c = K // (i*(i-1) // 2)
if bin(c).count('1') == 1:
n1 = i
n0 = 0
while c > 1:
c //= 2
n0 += 1
break
ans = [1]*n1 + [0]*n0
print(len(ans))
print(*ans)