結果

問題 No.2479 Sum of Squares
ユーザー 👑 loop0919
提出日時 2023-09-22 22:19:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 34 ms / 2,000 ms
コード長 490 bytes
コンパイル時間 194 ms
コンパイル使用メモリ 82,340 KB
実行使用メモリ 53,484 KB
最終ジャッジ日時 2024-07-08 13:03:24
合計ジャッジ時間 2,173 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

# import系 ---

# 入力用 ---
INT = lambda: int(input())
MI = lambda: map(int, input().split())
MI_DEC = lambda: map(lambda x: int(x) - 1, input().split())
LI = lambda: list(map(int, input().split()))
LI_DEC = lambda: list(map(lambda x: int(x) - 1, input().split()))
LS = lambda: list(input())
LSS = lambda: input().split()



# コード ---
from math import isqrt
S = INT()

A = []

while S > 0:
    sqrt_S = isqrt(S)
    A.append(sqrt_S**2)
    S -= sqrt_S**2

print(len(A))
print(*A)
0