結果

問題 No.419 直角三角形
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2023-06-17 13:45:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 116 ms / 1,000 ms
コード長 272 bytes
コンパイル時間 965 ms
コンパイル使用メモリ 87,032 KB
実行使用メモリ 73,364 KB
最終ジャッジ日時 2023-09-07 10:28:57
合計ジャッジ時間 4,442 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
73,012 KB
testcase_01 AC 108 ms
72,864 KB
testcase_02 AC 114 ms
72,988 KB
testcase_03 AC 109 ms
73,276 KB
testcase_04 AC 108 ms
72,876 KB
testcase_05 AC 113 ms
72,988 KB
testcase_06 AC 116 ms
72,936 KB
testcase_07 AC 108 ms
73,364 KB
testcase_08 AC 113 ms
73,016 KB
testcase_09 AC 109 ms
73,024 KB
testcase_10 AC 107 ms
73,196 KB
testcase_11 AC 107 ms
72,868 KB
testcase_12 AC 106 ms
73,080 KB
testcase_13 AC 115 ms
73,104 KB
testcase_14 AC 108 ms
72,936 KB
testcase_15 AC 109 ms
72,752 KB
testcase_16 AC 107 ms
72,832 KB
testcase_17 AC 111 ms
73,168 KB
testcase_18 AC 112 ms
73,208 KB
testcase_19 AC 108 ms
72,992 KB
testcase_20 AC 106 ms
73,024 KB
testcase_21 AC 108 ms
72,988 KB
testcase_22 AC 109 ms
72,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline

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

a,b = min(a,b),max(a,b)
if a==b:
    print(math.sqrt(a**2+b**2))
else:
    print(math.sqrt(b**2-a**2))
0