結果

問題 No.306 さいたま2008
ユーザー proriboneproribone
提出日時 2020-10-21 21:50:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 299 bytes
コンパイル時間 364 ms
コンパイル使用メモリ 87,340 KB
実行使用メモリ 71,944 KB
最終ジャッジ日時 2023-09-28 14:27:29
合計ジャッジ時間 3,570 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 78 ms
71,516 KB
testcase_02 AC 75 ms
71,760 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 76 ms
71,792 KB
testcase_14 AC 76 ms
71,804 KB
testcase_15 AC 75 ms
71,608 KB
testcase_16 AC 76 ms
71,816 KB
testcase_17 AC 77 ms
71,892 KB
testcase_18 AC 74 ms
71,512 KB
testcase_19 AC 76 ms
71,816 KB
testcase_20 AC 77 ms
71,708 KB
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

xa,ya=map(int,input().split())
xb,yb=map(int,input().split())


def f(yp):
    AP=xa**2+(yp-ya)**2
    BP=xb**2+(yp-yb)**2
    return AP+BP

low,high=0,1000

while(high-low>10**(-8)):
    l2=(low*2+high)/3
    h2=(low+high*2)/3
    if f(l2)>f(h2):
        low=l2
    else:
        high=h2
print(low)
0