結果

問題 No.2479 Sum of Squares
ユーザー hirayuu_ychirayuu_yc
提出日時 2023-09-22 21:28:57
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 192 bytes
コンパイル時間 258 ms
コンパイル使用メモリ 86,956 KB
実行使用メモリ 91,892 KB
最終ジャッジ日時 2023-09-22 21:29:10
合計ジャッジ時間 7,891 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 226 ms
89,004 KB
testcase_01 AC 226 ms
88,872 KB
testcase_02 AC 223 ms
88,936 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 219 ms
88,956 KB
testcase_06 AC 223 ms
89,112 KB
testcase_07 AC 223 ms
88,956 KB
testcase_08 AC 225 ms
89,036 KB
testcase_09 AC 224 ms
88,768 KB
testcase_10 AC 225 ms
88,912 KB
testcase_11 AC 220 ms
88,912 KB
testcase_12 AC 219 ms
89,012 KB
testcase_13 AC 221 ms
88,820 KB
testcase_14 AC 219 ms
89,108 KB
testcase_15 AC 223 ms
88,968 KB
testcase_16 AC 220 ms
88,808 KB
testcase_17 AC 222 ms
88,924 KB
testcase_18 AC 221 ms
88,992 KB
testcase_19 AC 225 ms
88,824 KB
testcase_20 AC 223 ms
89,060 KB
testcase_21 AC 223 ms
88,768 KB
testcase_22 AC 223 ms
89,032 KB
testcase_23 AC 223 ms
89,044 KB
testcase_24 AC 222 ms
89,164 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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