結果

問題 No.419 直角三角形
ユーザー rlangevinrlangevin
提出日時 2023-01-04 23:50:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 1,000 ms
コード長 162 bytes
コンパイル時間 499 ms
コンパイル使用メモリ 86,780 KB
実行使用メモリ 71,456 KB
最終ジャッジ日時 2023-08-18 20:14:35
合計ジャッジ時間 3,172 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,056 KB
testcase_01 AC 69 ms
71,004 KB
testcase_02 AC 79 ms
71,132 KB
testcase_03 AC 65 ms
71,348 KB
testcase_04 AC 66 ms
71,284 KB
testcase_05 AC 67 ms
71,368 KB
testcase_06 AC 67 ms
71,192 KB
testcase_07 AC 65 ms
71,224 KB
testcase_08 AC 66 ms
71,312 KB
testcase_09 AC 69 ms
71,328 KB
testcase_10 AC 66 ms
70,832 KB
testcase_11 AC 64 ms
71,244 KB
testcase_12 AC 65 ms
70,808 KB
testcase_13 AC 66 ms
71,028 KB
testcase_14 AC 70 ms
71,236 KB
testcase_15 AC 70 ms
71,336 KB
testcase_16 AC 70 ms
71,164 KB
testcase_17 AC 69 ms
71,092 KB
testcase_18 AC 69 ms
71,224 KB
testcase_19 AC 67 ms
71,396 KB
testcase_20 AC 81 ms
71,368 KB
testcase_21 AC 67 ms
71,320 KB
testcase_22 AC 65 ms
71,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import *

a, b = map(int, input().split())
if a == b:
    print(sqrt(b ** 2 + a ** 2))
    exit()
if a > b:
    a, b = b, a
print(sqrt(b ** 2 - a ** 2))
0