結果

問題 No.419 直角三角形
ユーザー hhgfhn1hhgfhn1
提出日時 2018-10-29 19:50:01
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 327 bytes
コンパイル時間 3,737 ms
コンパイル使用メモリ 74,608 KB
実行使用メモリ 41,780 KB
最終ジャッジ日時 2024-04-29 23:12:37
合計ジャッジ時間 6,355 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 142 ms
41,100 KB
testcase_01 AC 135 ms
41,100 KB
testcase_02 AC 136 ms
40,968 KB
testcase_03 AC 140 ms
41,348 KB
testcase_04 AC 140 ms
41,268 KB
testcase_05 AC 139 ms
41,164 KB
testcase_06 AC 134 ms
41,068 KB
testcase_07 AC 133 ms
41,064 KB
testcase_08 WA -
testcase_09 AC 134 ms
41,284 KB
testcase_10 AC 139 ms
41,780 KB
testcase_11 AC 136 ms
41,208 KB
testcase_12 WA -
testcase_13 AC 141 ms
41,228 KB
testcase_14 AC 132 ms
41,388 KB
testcase_15 AC 133 ms
41,388 KB
testcase_16 AC 136 ms
41,080 KB
testcase_17 AC 135 ms
41,032 KB
testcase_18 AC 133 ms
41,132 KB
testcase_19 AC 133 ms
41,368 KB
testcase_20 AC 137 ms
41,084 KB
testcase_21 AC 136 ms
41,512 KB
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int a=scanner.nextInt();
		int b=scanner.nextInt();
		double c=Math.pow(Math.max(a, b),2)-Math.pow(Math.min(a, b), 2);
		System.out.println(Math.sqrt(c));
	}
}
0