結果

問題 No.1064 ∪∩∩ / Cup Cap Cap
ユーザー stngstng
提出日時 2022-08-19 17:13:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 488 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 82,204 KB
実行使用メモリ 88,920 KB
最終ジャッジ日時 2024-04-16 21:03:39
合計ジャッジ時間 6,479 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
88,856 KB
testcase_01 AC 120 ms
88,348 KB
testcase_02 AC 123 ms
88,748 KB
testcase_03 AC 126 ms
88,908 KB
testcase_04 AC 123 ms
88,288 KB
testcase_05 AC 122 ms
88,292 KB
testcase_06 AC 123 ms
88,636 KB
testcase_07 AC 119 ms
88,632 KB
testcase_08 AC 124 ms
88,400 KB
testcase_09 AC 120 ms
88,604 KB
testcase_10 AC 120 ms
88,484 KB
testcase_11 AC 120 ms
88,612 KB
testcase_12 AC 121 ms
88,584 KB
testcase_13 AC 117 ms
88,340 KB
testcase_14 AC 116 ms
88,920 KB
testcase_15 AC 122 ms
88,888 KB
testcase_16 AC 124 ms
88,708 KB
testcase_17 AC 126 ms
88,656 KB
testcase_18 AC 128 ms
88,676 KB
testcase_19 AC 124 ms
88,776 KB
testcase_20 AC 122 ms
88,684 KB
testcase_21 AC 126 ms
88,724 KB
testcase_22 AC 123 ms
88,612 KB
testcase_23 AC 120 ms
88,832 KB
testcase_24 AC 119 ms
88,672 KB
testcase_25 AC 129 ms
88,544 KB
testcase_26 AC 123 ms
88,420 KB
testcase_27 AC 118 ms
88,396 KB
testcase_28 AC 118 ms
88,600 KB
testcase_29 AC 124 ms
88,592 KB
testcase_30 AC 128 ms
88,364 KB
testcase_31 AC 123 ms
88,332 KB
testcase_32 AC 127 ms
88,668 KB
testcase_33 AC 123 ms
88,632 KB
testcase_34 AC 123 ms
88,624 KB
testcase_35 AC 132 ms
88,860 KB
testcase_36 AC 124 ms
88,904 KB
testcase_37 AC 128 ms
88,332 KB
testcase_38 AC 122 ms
88,676 KB
testcase_39 AC 124 ms
88,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def makeLinearEquation(x1, y1, x2, y2):
    return (y1-y2),(x2-x1),(y2-y1)*x1-y1*(x2-x1)

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

from fractions import Fraction

a,b,c,d = map(int,input().split())
A,B,C = 2,(a-c),(b-d)
p,q = 0,0
tmp = B**2-4*A*C
if tmp < 0:
    print("No")
elif tmp == 0:
    print("Yes")
else:
    x1,x2 = (-B+(tmp)**0.5)/(2*A),(-B-(tmp)**0.5)/(2*A)
    y1,y2 = makeY(x1),makeY(x2)
    a1 = x1-x2
    b1 = y1-y2
    c = a1*y1-b1*x1
    p = b1/a1
    q = c/a1
    print(p,q)
0