結果

問題 No.419 直角三角形
ユーザー maninimanini
提出日時 2016-09-11 01:11:31
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 309 bytes
コンパイル時間 3,038 ms
コンパイル使用メモリ 73,580 KB
実行使用メモリ 41,488 KB
最終ジャッジ日時 2024-04-28 10:09:23
合計ジャッジ時間 6,464 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
40,884 KB
testcase_01 AC 126 ms
41,164 KB
testcase_02 AC 127 ms
40,900 KB
testcase_03 AC 127 ms
41,068 KB
testcase_04 AC 127 ms
40,928 KB
testcase_05 AC 116 ms
40,104 KB
testcase_06 AC 126 ms
41,020 KB
testcase_07 AC 130 ms
41,056 KB
testcase_08 WA -
testcase_09 AC 119 ms
40,412 KB
testcase_10 AC 115 ms
40,236 KB
testcase_11 AC 127 ms
40,936 KB
testcase_12 WA -
testcase_13 AC 132 ms
41,216 KB
testcase_14 AC 118 ms
40,092 KB
testcase_15 AC 117 ms
40,260 KB
testcase_16 AC 129 ms
41,120 KB
testcase_17 AC 127 ms
41,028 KB
testcase_18 AC 129 ms
40,860 KB
testcase_19 AC 132 ms
40,976 KB
testcase_20 AC 127 ms
41,240 KB
testcase_21 AC 118 ms
39,520 KB
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
 
public class Main{
 
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		long a=s.nextInt();
		long b=s.nextInt();
		
		long max=Math.max(a, b);
		long min=Math.min(a, b);
		
		double c=Math.sqrt((double)max*max-min*min);
		System.out.println(c);
	}
}
0