結果
| 問題 |
No.2479 Sum of Squares
|
| コンテスト | |
| ユーザー |
やでな@競プロ
|
| 提出日時 | 2023-10-08 23:28:57 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 365 bytes |
| コンパイル時間 | 368 ms |
| コンパイル使用メモリ | 82,276 KB |
| 実行使用メモリ | 54,088 KB |
| 最終ジャッジ日時 | 2024-07-26 18:14:02 |
| 合計ジャッジ時間 | 5,010 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 22 |
ソースコード
s = int(input())
ans = []
num = s
for i in range(15):
if num == 0:
break
left = -1
right = 10**9
while abs(right-left) > 1:
mid = (right+left)//2
if (mid)**2 > num:
right = mid
else:
left = mid
#print(mid)
ans.append(left**2)
num -= left**2
#print(ans)
print(*ans)
やでな@競プロ