結果
問題 | No.419 直角三角形 |
ユーザー |
|
提出日時 | 2018-09-17 04:40:26 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 28 ms / 1,000 ms |
コード長 | 317 bytes |
コンパイル時間 | 115 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-18 07:35:03 |
合計ジャッジ時間 | 1,385 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
from sys import stdin, stdoutdef main():AB = list(map(int, input().split()))AB.sort()case1 = (AB[0] ** 2 + AB[1] ** 2) ** 0.5case2 = (AB[1] ** 2 - AB[0] ** 2) ** 0.5if AB[0] == AB[1]:print(case1)else:print(min(case1, case2))input = lambda: stdin.readline()main()