結果

問題 No.1064 ∪∩∩ / Cup Cap Cap
ユーザー rlangevinrlangevin
提出日時 2023-01-12 01:15:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 48 ms / 2,000 ms
コード長 341 bytes
コンパイル時間 199 ms
コンパイル使用メモリ 81,932 KB
実行使用メモリ 52,608 KB
最終ジャッジ日時 2024-12-22 18:44:32
合計ジャッジ時間 3,277 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 36
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import *

def f(x):
    return x ** 2 + a * x + b

a, b, c, d = map(int, input().split())
D = (a - c) ** 2 - 8 * (b - d)
if D < 0:
    print("No")
    exit()
if D == 0:
    print("Yes")
    exit()
    
x1 = (-(a - c) + sqrt(D))/4
x2 = (-(a - c) - sqrt(D))/4
y1 = f(x1)
y2 = f(x2)
p = (y2 - y1)/(x2 - x1)
q = y1 - p * x1
print(p, q)
0