結果
問題 | No.2479 Sum of Squares |
ユーザー |
|
提出日時 | 2023-09-22 22:47:50 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 332 bytes |
コンパイル時間 | 141 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-08 13:30:51 |
合計ジャッジ時間 | 1,962 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 WA * 2 |
ソースコード
import math import sys def main(): input = lambda: sys.stdin.readline()[:-1] S = int(input()) ans, n = [], S while n > 0: x = math.floor(math.sqrt(n)) ** 2 ans.append(x) n -= x print(len(ans)) print(*ans) if not __debug__: f = open(sys.argv[1], "r") sys.stdin = f main()