結果
| 問題 |
No.2479 Sum of Squares
|
| コンテスト | |
| ユーザー |
KDKJ
|
| 提出日時 | 2023-11-29 15:34:47 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 425 bytes |
| コンパイル時間 | 260 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 54,912 KB |
| 最終ジャッジ日時 | 2024-09-26 13:25:05 |
| 合計ジャッジ時間 | 2,619 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 WA * 2 |
ソースコード
from heapq import heappush, heappop, heapify
import sys
from collections import defaultdict, deque
from math import ceil, floor, sqrt, factorial, gcd
from itertools import permutations, combinations
from bisect import bisect_left, bisect_right
sys.setrecursionlimit(10**6)
# input = sys.stdin.readline
s = int(input())
ans = []
while s > 0:
x = floor(s**0.5)
s -= x*x
ans.append(x*x)
print(len(ans))
print(*ans)
KDKJ