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