結果
| 問題 |
No.688 E869120 and Constructing Array 2
|
| コンテスト | |
| ユーザー |
syunsuke
|
| 提出日時 | 2018-06-19 21:53:32 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 633 bytes |
| コンパイル時間 | 68 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-07 14:18:15 |
| 合計ジャッジ時間 | 1,638 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 RE * 4 |
ソースコード
# coding: utf-8
# Your code here!
N=int(input())
for i in range(int((N/2)**0.5)):
for j in range(100):
if (int((N/2)**0.5)-i)*(int((N/2)**0.5)-i+1)*(2**(j))>N:
break
elif (int((N/2)**0.5)-i)*(int((N/2)**0.5)-i+1)*(2**(j))==N:
listans=[int((N/2)**0.5)-i+1,j]
elif (int((N/2)**0.5)-i)*(int((N/2)**0.5)-i+1)*(2**(j))<N:
j+=1
list1=[]
for k in range(listans[0]):
list1.append(1)
for l in range(listans[1]+1):
list1.append(0)
print(listans[0]+listans[1]+1)
a=""
for m in range(len(list1)):
a=a+" "+str(list1[m])
print(a.lstrip())
syunsuke