結果

問題 No.419 直角三角形
ユーザー 双六双六
提出日時 2020-07-29 23:24:23
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 97 ms / 1,000 ms
コード長 404 bytes
コンパイル時間 1,301 ms
コンパイル使用メモリ 87,648 KB
実行使用メモリ 72,352 KB
最終ジャッジ日時 2023-09-13 02:38:11
合計ジャッジ時間 3,886 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
72,000 KB
testcase_01 AC 93 ms
72,164 KB
testcase_02 AC 91 ms
72,000 KB
testcase_03 AC 95 ms
71,776 KB
testcase_04 AC 97 ms
71,996 KB
testcase_05 AC 94 ms
71,916 KB
testcase_06 AC 94 ms
72,228 KB
testcase_07 AC 93 ms
72,252 KB
testcase_08 AC 95 ms
72,316 KB
testcase_09 AC 92 ms
71,924 KB
testcase_10 AC 94 ms
72,164 KB
testcase_11 AC 95 ms
72,016 KB
testcase_12 AC 94 ms
72,352 KB
testcase_13 AC 97 ms
71,916 KB
testcase_14 AC 95 ms
72,096 KB
testcase_15 AC 93 ms
72,184 KB
testcase_16 AC 93 ms
72,148 KB
testcase_17 AC 95 ms
72,260 KB
testcase_18 AC 93 ms
72,256 KB
testcase_19 AC 96 ms
72,144 KB
testcase_20 AC 93 ms
71,968 KB
testcase_21 AC 94 ms
72,008 KB
testcase_22 AC 94 ms
72,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	a, b = getlist()
	if a == b:
		print(a * (2 ** 0.5))
		return
	a, b = list(sorted([a, b]))
	ans = (b ** 2 - a ** 2) ** 0.5
	print(ans)


if __name__ == '__main__':
	main()
0