結果
| 問題 |
No.550 夏休みの思い出(1)
|
| コンテスト | |
| ユーザー |
YNonohara
|
| 提出日時 | 2017-08-02 13:31:53 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 594 bytes |
| コンパイル時間 | 113 ms |
| コンパイル使用メモリ | 12,928 KB |
| 実行使用メモリ | 24,640 KB |
| 最終ジャッジ日時 | 2024-10-11 12:55:53 |
| 合計ジャッジ時間 | 6,522 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | TLE * 1 -- * 54 |
ソースコード
import math
import sys
A,B,C=[int(i) for i in input().split()]
def dainyu(p):
return p**3+A*p**2+B*p+C
def hyouji(x,y,z):
li=[round(x),round(y),round(z)]
li.sort()
li=list(map(str,li))
print(" ".join(li))
H=math.ceil((-A+math.sqrt(A**2-3*B))/3)
K=math.floor((-A-math.sqrt(A**2-3*B))/3)
x=0
for j in range(K,H):
if dainyu(j)==0:
x=j
break
if x!=0:
wa=-A-x
seki=-C/x
y=(wa+math.sqrt(wa**2-4*seki))/2
z=(wa-math.sqrt(wa**2-4*seki))/2
hyouji(x,y,z)
else:
y=(-A+math.sqrt(A**2-4*B))/2
z=(-A+math.sqrt(A**2-4*B))/2
hyouji(x,y,z)
YNonohara