結果

問題 No.419 直角三角形
ユーザー mesame3993mesame3993
提出日時 2021-11-16 15:20:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 37 ms / 1,000 ms
コード長 300 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 82,456 KB
実行使用メモリ 54,348 KB
最終ジャッジ日時 2024-12-17 14:30:10
合計ジャッジ時間 1,939 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

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