結果
| 問題 | No.2479 Sum of Squares |
| コンテスト | |
| ユーザー |
ikoma
|
| 提出日時 | 2023-09-22 21:30:42 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 216 bytes |
| 記録 | |
| コンパイル時間 | 999 ms |
| コンパイル使用メモリ | 21,288 KB |
| 実行使用メモリ | 20,824 KB |
| 最終ジャッジ日時 | 2026-08-12 18:18:57 |
| 合計ジャッジ時間 | 5,200 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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