結果

問題 No.2479 Sum of Squares
ユーザー mattu34
提出日時 2023-11-20 14:58:05
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 656 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 65,792 KB
最終ジャッジ日時 2024-09-26 06:39:09
合計ジャッジ時間 2,465 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20 RE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
import sys
import heapq
import bisect
import itertools
from functools import lru_cache
import math


dxdy1 = ((0, 1), (0, -1), (1, 0), (-1, 0))
dxdy2 = ((0, 1), (0, -1), (1, 0), (-1, 0), (1, 1), (-1, -1), (1, -1), (-1, 1))
dxdy3 = ((0, 1), (1, 0))
dxdy4 = ((1, 1), (1, -1), (-1, 1), (-1, -1))
INF = float("inf")
MOD = 998244353
mod = 998244353
MOD2 = 10**9 + 7
mod2 = 10**9 + 7
# memo : len([a,b,...,z])==26

input = lambda: sys.stdin.readline().rstrip()
mi = lambda: map(int, input().split())
li = lambda: list(mi())


N = int(input())
A = []
while N:
    a = int(N**0.5)
    A.append(a**2)
    N -= a**2
print(len(A))
print(*A)
0