結果

問題 No.1064 ∪∩∩ / Cup Cap Cap
ユーザー zaki_chemtechzaki_chemtech
提出日時 2020-07-13 16:17:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 332 bytes
コンパイル時間 265 ms
コンパイル使用メモリ 86,980 KB
実行使用メモリ 71,704 KB
最終ジャッジ日時 2023-08-07 15:12:32
合計ジャッジ時間 4,520 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,248 KB
testcase_01 AC 71 ms
71,284 KB
testcase_02 AC 69 ms
71,484 KB
testcase_03 AC 71 ms
71,516 KB
testcase_04 AC 71 ms
71,344 KB
testcase_05 AC 70 ms
71,600 KB
testcase_06 AC 71 ms
71,440 KB
testcase_07 AC 71 ms
71,704 KB
testcase_08 AC 70 ms
71,512 KB
testcase_09 AC 69 ms
71,132 KB
testcase_10 AC 71 ms
71,340 KB
testcase_11 AC 70 ms
71,432 KB
testcase_12 AC 69 ms
71,552 KB
testcase_13 AC 71 ms
71,548 KB
testcase_14 AC 70 ms
71,464 KB
testcase_15 AC 71 ms
71,060 KB
testcase_16 AC 71 ms
71,544 KB
testcase_17 AC 70 ms
71,568 KB
testcase_18 AC 71 ms
71,596 KB
testcase_19 AC 72 ms
71,332 KB
testcase_20 AC 71 ms
71,412 KB
testcase_21 AC 72 ms
71,608 KB
testcase_22 AC 71 ms
71,656 KB
testcase_23 AC 71 ms
71,524 KB
testcase_24 AC 71 ms
71,172 KB
testcase_25 AC 70 ms
71,368 KB
testcase_26 AC 71 ms
71,116 KB
testcase_27 AC 70 ms
71,340 KB
testcase_28 AC 70 ms
71,500 KB
testcase_29 AC 69 ms
71,344 KB
testcase_30 AC 69 ms
71,456 KB
testcase_31 AC 69 ms
71,368 KB
testcase_32 AC 70 ms
71,464 KB
testcase_33 AC 70 ms
71,464 KB
testcase_34 AC 70 ms
71,060 KB
testcase_35 AC 71 ms
71,244 KB
testcase_36 AC 71 ms
71,536 KB
testcase_37 AC 71 ms
71,532 KB
testcase_38 AC 71 ms
71,416 KB
testcase_39 AC 71 ms
71,316 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b,c,d = map(int,input().split())

x_1 = (-1*(a-c)+((a-c)**2-4*2*(b-d))**0.5)/4
x_2 = (-1*(a-c)-((a-c)**2-4*2*(b-d))**0.5)/4

if isinstance(x_1, complex):
    print('No')
elif x_1 == x_2:
    print('Yes')
else:
    y_1 = x_1**2 + a*x_1 + b
    y_2 = x_2**2 + a*x_2 + b
    p = (y_2-y_1)/(x_2-x_1)
    q = y_1-p*x_1
    print(p, q)
0