結果

問題 No.419 直角三角形
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-16 03:30:21
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 330 bytes
コンパイル時間 1,909 ms
コンパイル使用メモリ 71,932 KB
実行使用メモリ 56,404 KB
最終ジャッジ日時 2023-08-17 07:16:59
合計ジャッジ時間 6,101 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
56,404 KB
testcase_01 AC 123 ms
55,944 KB
testcase_02 AC 122 ms
55,904 KB
testcase_03 AC 122 ms
55,752 KB
testcase_04 AC 124 ms
55,544 KB
testcase_05 AC 124 ms
56,140 KB
testcase_06 AC 124 ms
55,740 KB
testcase_07 AC 124 ms
55,772 KB
testcase_08 WA -
testcase_09 AC 126 ms
55,500 KB
testcase_10 AC 123 ms
56,040 KB
testcase_11 AC 124 ms
55,784 KB
testcase_12 WA -
testcase_13 AC 122 ms
55,992 KB
testcase_14 AC 124 ms
56,000 KB
testcase_15 AC 124 ms
56,044 KB
testcase_16 AC 122 ms
56,144 KB
testcase_17 AC 126 ms
55,896 KB
testcase_18 AC 125 ms
55,728 KB
testcase_19 AC 124 ms
56,000 KB
testcase_20 AC 125 ms
56,036 KB
testcase_21 AC 126 ms
55,704 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 l = Math.max(a,b);
        int m = Math.min(a,b);
        double c = Math.sqrt(l*l-m*m);
        System.out.println(c);
    }
}
0