結果

問題 No.419 直角三角形
ユーザー sekihankamibanzsekihankamibanz
提出日時 2018-10-28 10:50:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 238 bytes
コンパイル時間 84 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 44,500 KB
最終ジャッジ日時 2024-04-29 22:23:27
合計ジャッジ時間 13,683 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 534 ms
43,800 KB
testcase_01 WA -
testcase_02 AC 531 ms
44,176 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 525 ms
44,052 KB
testcase_06 WA -
testcase_07 AC 540 ms
44,060 KB
testcase_08 AC 556 ms
44,272 KB
testcase_09 AC 543 ms
44,056 KB
testcase_10 AC 531 ms
43,804 KB
testcase_11 AC 534 ms
44,056 KB
testcase_12 AC 535 ms
44,184 KB
testcase_13 WA -
testcase_14 AC 513 ms
43,936 KB
testcase_15 AC 528 ms
44,016 KB
testcase_16 WA -
testcase_17 AC 523 ms
43,800 KB
testcase_18 AC 540 ms
43,924 KB
testcase_19 AC 524 ms
44,184 KB
testcase_20 AC 523 ms
44,188 KB
testcase_21 WA -
testcase_22 AC 516 ms
44,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math 
import numpy as np

a, b = [int(x) for x in input().split(' ')]
if b > a:
    a, b = b, a
    c = np.sqrt(np.array([a ** 2 - b ** 2]))
    print(c[0])

elif a == b:
    c = np.sqrt(np.array([a ** 2 + b ** 2]))
    print(c[0])
0