結果

問題 No.419 直角三角形
ユーザー mesame3993mesame3993
提出日時 2021-11-16 15:20:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 1,000 ms
コード長 300 bytes
コンパイル時間 2,421 ms
コンパイル使用メモリ 86,956 KB
実行使用メモリ 72,008 KB
最終ジャッジ日時 2023-08-22 15:15:25
合計ジャッジ時間 3,295 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,568 KB
testcase_01 AC 70 ms
71,836 KB
testcase_02 AC 71 ms
71,764 KB
testcase_03 AC 70 ms
71,876 KB
testcase_04 AC 72 ms
71,932 KB
testcase_05 AC 71 ms
71,504 KB
testcase_06 AC 70 ms
71,488 KB
testcase_07 AC 70 ms
71,776 KB
testcase_08 AC 71 ms
71,760 KB
testcase_09 AC 70 ms
71,912 KB
testcase_10 AC 71 ms
71,824 KB
testcase_11 AC 71 ms
71,820 KB
testcase_12 AC 70 ms
71,432 KB
testcase_13 AC 71 ms
71,700 KB
testcase_14 AC 71 ms
71,672 KB
testcase_15 AC 71 ms
71,932 KB
testcase_16 AC 71 ms
72,008 KB
testcase_17 AC 71 ms
71,624 KB
testcase_18 AC 70 ms
71,844 KB
testcase_19 AC 70 ms
71,892 KB
testcase_20 AC 69 ms
71,776 KB
testcase_21 AC 69 ms
71,748 KB
testcase_22 AC 71 ms
71,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
  from sys import stdin
  input=stdin.readline
  import math
  # n = int(input())
  # s = input()[:-1]
  a,b = map(int, input().split())
  # A = list(map(int, input().split()))
  if a > b:
    a,b = b,a
  if a == b:
    print(a * 2 ** (0.5))
  else:
    print(math.sqrt(b*b - a*a))
main()
0