結果
| 問題 | No.2479 Sum of Squares |
| コンテスト | |
| ユーザー |
310icecrystal
|
| 提出日時 | 2023-09-23 00:43:52 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 61 ms / 2,000 ms |
| + 918µs | |
| コード長 | 258 bytes |
| 記録 | |
| コンパイル時間 | 1,235 ms |
| コンパイル使用メモリ | 96,108 KB |
| 実行使用メモリ | 78,848 KB |
| 最終ジャッジ日時 | 2026-08-13 08:05:48 |
| 合計ジャッジ時間 | 4,254 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
S = int(input())
ans = []
while S:
OK = 1
NG = 10**10
while NG - OK >= 2:
MID = (OK+NG)//2
if MID*MID <= S:
OK = MID
else:
NG = MID
ans.append(OK*OK)
S -= OK*OK
print(len(ans))
print(*ans)
310icecrystal