結果
問題 | No.2479 Sum of Squares |
ユーザー |
![]() |
提出日時 | 2023-09-28 07:24:37 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 41 ms / 2,000 ms |
コード長 | 221 bytes |
コンパイル時間 | 310 ms |
コンパイル使用メモリ | 82,284 KB |
実行使用メモリ | 53,492 KB |
最終ジャッジ日時 | 2024-07-21 01:50:55 |
合計ジャッジ時間 | 2,587 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
result=[] x=int(input()) while x>0: l=1 r=10**9 while True: m=(l+r+1)//2 if m**2<=x: l=m else: r=m-1 if l==r: break result.append(l**2) x-=l**2 print(len(result)) print(*result)