結果

問題 No.419 直角三角形
ユーザー tentententen
提出日時 2020-09-11 17:12:45
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 319 bytes
コンパイル時間 1,831 ms
コンパイル使用メモリ 71,404 KB
実行使用メモリ 56,752 KB
最終ジャッジ日時 2023-08-27 01:02:06
合計ジャッジ時間 5,991 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,672 KB
testcase_01 AC 118 ms
55,964 KB
testcase_02 AC 122 ms
55,696 KB
testcase_03 AC 118 ms
55,928 KB
testcase_04 AC 118 ms
56,032 KB
testcase_05 AC 119 ms
55,704 KB
testcase_06 AC 120 ms
55,636 KB
testcase_07 AC 122 ms
55,788 KB
testcase_08 WA -
testcase_09 AC 118 ms
55,976 KB
testcase_10 AC 117 ms
55,432 KB
testcase_11 AC 118 ms
55,884 KB
testcase_12 WA -
testcase_13 AC 118 ms
56,256 KB
testcase_14 AC 118 ms
55,860 KB
testcase_15 AC 114 ms
55,796 KB
testcase_16 AC 118 ms
55,588 KB
testcase_17 AC 118 ms
56,328 KB
testcase_18 AC 120 ms
56,040 KB
testcase_19 AC 122 ms
55,692 KB
testcase_20 AC 114 ms
55,768 KB
testcase_21 AC 117 ms
56,752 KB
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
    	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(Math.pow(max, 2) - Math.pow(min, 2)));
	}
}
0