結果
| 問題 | No.2479 Sum of Squares |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-09-23 02:03:25 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 63 ms / 2,000 ms |
| + 27µs | |
| コード長 | 196 bytes |
| 記録 | |
| コンパイル時間 | 820 ms |
| コンパイル使用メモリ | 96,236 KB |
| 実行使用メモリ | 79,360 KB |
| 最終ジャッジ日時 | 2026-08-13 10:37:31 |
| 合計ジャッジ時間 | 3,825 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
n = int(input())
ans = []
while n > 0:
x = int(n**0.5)
while x * x < n:
x += 1
while x * x > n:
x -= 1
ans.append(x * x)
n -= x * x
print(len(ans))
print(*ans)