結果
| 問題 | 
                            No.2479 Sum of Squares
                             | 
                    
| コンテスト | |
| ユーザー | 
                             takumaiq
                         | 
                    
| 提出日時 | 2023-09-19 22:35:55 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 28 ms / 2,000 ms | 
| コード長 | 227 bytes | 
| コンパイル時間 | 96 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-07-06 17:40:35 | 
| 合計ジャッジ時間 | 1,783 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 22 | 
ソースコード
S=int(input())
ans=[]
rest=S
for i in range(15):
  l,r=0,10**10
  while r-l>1:
    m=(l+r)//2
    if m**2>rest:
      r=m
    else:
      l=m
  rest-=l**2
  if l==0: break
  ans.append(l**2)
print(len(ans))
print(*ans,sep=" ")
            
            
            
        
            
takumaiq