結果

問題 No.419 直角三角形
ユーザー htensaihtensai
提出日時 2019-11-19 23:43:44
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 306 bytes
コンパイル時間 2,414 ms
コンパイル使用メモリ 74,468 KB
実行使用メモリ 54,364 KB
最終ジャッジ日時 2024-04-15 03:49:58
合計ジャッジ時間 6,818 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 146 ms
54,248 KB
testcase_01 AC 142 ms
54,216 KB
testcase_02 AC 136 ms
54,284 KB
testcase_03 AC 137 ms
54,084 KB
testcase_04 AC 136 ms
54,040 KB
testcase_05 AC 140 ms
54,004 KB
testcase_06 AC 137 ms
54,032 KB
testcase_07 AC 150 ms
54,148 KB
testcase_08 WA -
testcase_09 AC 145 ms
54,332 KB
testcase_10 AC 144 ms
53,904 KB
testcase_11 AC 151 ms
54,132 KB
testcase_12 WA -
testcase_13 AC 143 ms
54,124 KB
testcase_14 AC 140 ms
54,268 KB
testcase_15 AC 142 ms
53,892 KB
testcase_16 AC 149 ms
53,844 KB
testcase_17 AC 143 ms
54,112 KB
testcase_18 AC 140 ms
54,104 KB
testcase_19 AC 152 ms
54,360 KB
testcase_20 AC 142 ms
54,212 KB
testcase_21 AC 140 ms
54,304 KB
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
 	public static void main (String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int max = Math.max(a, b);
		int min = Math.min(a, b);
		System.out.println(Math.sqrt(max * max - min * min));
	}
}
0