結果
| 問題 |
No.2479 Sum of Squares
|
| コンテスト | |
| ユーザー |
ikoma
|
| 提出日時 | 2023-09-22 21:30:42 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 216 bytes |
| コンパイル時間 | 406 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-07-08 12:11:28 |
| 合計ジャッジ時間 | 1,869 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 RE * 2 |
ソースコード
import sys
input = sys.stdin.readline
S=int(input())
ans=[]
for _ in range(15):
x=int(S**0.5)
while (x+1)**2 <= S:
x+=1
ans.append(x**2)
S-=x**2
if S==0:break
print(len(ans))
print(*ans)
ikoma