結果

問題 No.419 直角三角形
ユーザー 👑 yumechiyumechi
提出日時 2016-09-10 02:03:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 258 bytes
コンパイル時間 594 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 80,384 KB
最終ジャッジ日時 2024-04-28 06:29:48
合計ジャッジ時間 4,153 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
80,000 KB
testcase_01 AC 134 ms
79,872 KB
testcase_02 AC 136 ms
79,872 KB
testcase_03 AC 134 ms
80,000 KB
testcase_04 AC 133 ms
79,872 KB
testcase_05 AC 133 ms
79,616 KB
testcase_06 AC 131 ms
79,744 KB
testcase_07 AC 130 ms
79,872 KB
testcase_08 WA -
testcase_09 AC 132 ms
80,000 KB
testcase_10 AC 139 ms
80,128 KB
testcase_11 AC 132 ms
80,000 KB
testcase_12 WA -
testcase_13 AC 133 ms
80,000 KB
testcase_14 AC 132 ms
80,000 KB
testcase_15 AC 131 ms
80,000 KB
testcase_16 AC 130 ms
79,872 KB
testcase_17 AC 130 ms
79,872 KB
testcase_18 AC 133 ms
80,000 KB
testcase_19 AC 133 ms
79,744 KB
testcase_20 AC 132 ms
79,872 KB
testcase_21 AC 133 ms
80,000 KB
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from decimal import *

def solve():
    getcontext().prec = 25
    a, b = map(int, input().split())
    a, b = max(a, b), min(a, b)
    print(Decimal(Decimal(a) ** Decimal(2) - Decimal(b) ** Decimal(2)) ** Decimal(0.5))

if __name__=="__main__":
    solve()
0