結果

問題 No.419 直角三角形
ユーザー mesame3993mesame3993
提出日時 2021-11-16 15:20:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 35 ms / 1,000 ms
コード長 300 bytes
コンパイル時間 935 ms
コンパイル使用メモリ 82,488 KB
実行使用メモリ 54,000 KB
最終ジャッジ日時 2024-05-09 20:58:12
合計ジャッジ時間 1,974 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,132 KB
testcase_01 AC 31 ms
53,024 KB
testcase_02 AC 30 ms
52,184 KB
testcase_03 AC 31 ms
54,000 KB
testcase_04 AC 30 ms
53,056 KB
testcase_05 AC 30 ms
52,256 KB
testcase_06 AC 30 ms
52,116 KB
testcase_07 AC 30 ms
52,636 KB
testcase_08 AC 30 ms
53,192 KB
testcase_09 AC 31 ms
52,792 KB
testcase_10 AC 31 ms
52,332 KB
testcase_11 AC 30 ms
52,012 KB
testcase_12 AC 32 ms
52,780 KB
testcase_13 AC 32 ms
52,848 KB
testcase_14 AC 32 ms
52,624 KB
testcase_15 AC 33 ms
52,668 KB
testcase_16 AC 35 ms
52,812 KB
testcase_17 AC 33 ms
53,284 KB
testcase_18 AC 33 ms
52,184 KB
testcase_19 AC 31 ms
52,272 KB
testcase_20 AC 31 ms
52,400 KB
testcase_21 AC 32 ms
52,896 KB
testcase_22 AC 33 ms
52,332 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