結果
| 問題 | No.419 直角三角形 |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2016-09-10 02:04:28 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 48 ms / 1,000 ms |
| + 9µs | |
| コード長 | 380 bytes |
| 記録 | |
| コンパイル時間 | 64 ms |
| コンパイル使用メモリ | 83,084 KB |
| 実行使用メモリ | 74,684 KB |
| 最終ジャッジ日時 | 2026-09-25 00:06:39 |
| 合計ジャッジ時間 | 2,463 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
from decimal import *
def solve():
getcontext().prec = 25
a, 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()