結果
問題 |
No.688 E869120 and Constructing Array 2
|
ユーザー |
![]() |
提出日時 | 2018-06-19 22:11:06 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 643 bytes |
コンパイル時間 | 74 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-07-07 14:18:18 |
合計ジャッジ時間 | 1,709 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 RE * 3 |
ソースコード
# coding: utf-8 # Your code here! N=int(input()) for i in range(-2,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())