結果
問題 | No.419 直角三角形 |
ユーザー |
|
提出日時 | 2016-09-10 02:04:28 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 130 ms / 1,000 ms |
コード長 | 380 bytes |
コンパイル時間 | 301 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 80,128 KB |
最終ジャッジ日時 | 2024-11-16 19:34:36 |
合計ジャッジ時間 | 3,773 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
from decimal import *def solve():getcontext().prec = 25a, b = map(int, input().split())a, b = max(a, b), min(a, b)if a != b:print(Decimal(Decimal(a) ** Decimal(2) - Decimal(b) ** Decimal(2)) ** Decimal(0.5))else:print(Decimal(Decimal(a) ** Decimal(2) + Decimal(b) ** Decimal(2)) ** Decimal(0.5))if __name__=="__main__":solve()