結果

問題 No.735 接線
ユーザー Mcpu3Mcpu3
提出日時 2018-09-29 00:17:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 140 ms / 2,000 ms
コード長 293 bytes
コンパイル時間 1,809 ms
コンパイル使用メモリ 73,764 KB
実行使用メモリ 54,364 KB
最終ジャッジ日時 2024-04-20 12:25:04
合計ジャッジ時間 6,346 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
53,724 KB
testcase_01 AC 121 ms
54,320 KB
testcase_02 AC 120 ms
54,072 KB
testcase_03 AC 122 ms
54,044 KB
testcase_04 AC 137 ms
54,176 KB
testcase_05 AC 120 ms
54,356 KB
testcase_06 AC 120 ms
54,312 KB
testcase_07 AC 112 ms
53,512 KB
testcase_08 AC 109 ms
53,552 KB
testcase_09 AC 105 ms
53,264 KB
testcase_10 AC 115 ms
53,356 KB
testcase_11 AC 122 ms
53,672 KB
testcase_12 AC 140 ms
54,316 KB
testcase_13 AC 106 ms
53,636 KB
testcase_14 AC 112 ms
53,696 KB
testcase_15 AC 123 ms
54,276 KB
testcase_16 AC 118 ms
54,060 KB
testcase_17 AC 110 ms
53,660 KB
testcase_18 AC 118 ms
53,720 KB
testcase_19 AC 118 ms
54,292 KB
testcase_20 AC 120 ms
54,284 KB
testcase_21 AC 115 ms
53,624 KB
testcase_22 AC 128 ms
54,284 KB
testcase_23 AC 120 ms
53,956 KB
testcase_24 AC 123 ms
54,244 KB
testcase_25 AC 128 ms
54,044 KB
testcase_26 AC 112 ms
53,392 KB
testcase_27 AC 126 ms
54,364 KB
testcase_28 AC 124 ms
54,224 KB
testcase_29 AC 124 ms
54,156 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double r = sc.nextDouble(), d = sc.nextDouble();
        sc.close();
        System.out.print(Math.sqrt(Math.pow(d, 2) - Math.pow(r, 2)));
    }
}
0