結果

問題 No.2479 Sum of Squares
ユーザー hirayuu_ychirayuu_yc
提出日時 2023-09-22 21:25:32
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 167 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 86,972 KB
実行使用メモリ 79,188 KB
最終ジャッジ日時 2023-09-22 21:25:44
合計ジャッジ時間 4,018 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
71,516 KB
testcase_01 AC 73 ms
71,464 KB
testcase_02 AC 73 ms
71,348 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 74 ms
71,612 KB
testcase_06 AC 73 ms
71,396 KB
testcase_07 AC 78 ms
71,692 KB
testcase_08 AC 75 ms
71,356 KB
testcase_09 AC 74 ms
71,604 KB
testcase_10 AC 74 ms
71,236 KB
testcase_11 AC 73 ms
71,536 KB
testcase_12 AC 74 ms
71,360 KB
testcase_13 AC 73 ms
71,140 KB
testcase_14 AC 73 ms
71,404 KB
testcase_15 AC 75 ms
71,288 KB
testcase_16 AC 76 ms
71,168 KB
testcase_17 AC 84 ms
71,568 KB
testcase_18 AC 100 ms
71,612 KB
testcase_19 AC 72 ms
71,332 KB
testcase_20 AC 71 ms
71,144 KB
testcase_21 AC 71 ms
71,232 KB
testcase_22 AC 73 ms
71,448 KB
testcase_23 AC 73 ms
71,352 KB
testcase_24 AC 73 ms
71,484 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
S=int(input())
ans=[]
for i in range(15):
    ans.append(math.floor(math.sqrt(S))**2)
    S-=ans[-1]
    if S==0:
        break
print(len(ans))
print(*ans)
0