結果

問題 No.735 接線
ユーザー GrenacheGrenache
提出日時 2019-04-26 21:07:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 592 bytes
コンパイル時間 3,223 ms
コンパイル使用メモリ 74,412 KB
実行使用メモリ 41,956 KB
最終ジャッジ日時 2024-05-03 20:50:26
合計ジャッジ時間 8,376 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
40,760 KB
testcase_01 AC 124 ms
40,772 KB
testcase_02 AC 130 ms
41,512 KB
testcase_03 AC 131 ms
41,308 KB
testcase_04 AC 129 ms
41,772 KB
testcase_05 AC 122 ms
41,528 KB
testcase_06 AC 126 ms
41,524 KB
testcase_07 AC 130 ms
41,596 KB
testcase_08 AC 132 ms
41,620 KB
testcase_09 AC 128 ms
41,596 KB
testcase_10 AC 134 ms
41,420 KB
testcase_11 AC 134 ms
41,692 KB
testcase_12 AC 130 ms
41,420 KB
testcase_13 AC 118 ms
40,788 KB
testcase_14 AC 129 ms
41,432 KB
testcase_15 AC 138 ms
41,288 KB
testcase_16 AC 120 ms
40,868 KB
testcase_17 AC 126 ms
41,312 KB
testcase_18 AC 131 ms
41,316 KB
testcase_19 AC 130 ms
41,956 KB
testcase_20 AC 135 ms
41,572 KB
testcase_21 AC 132 ms
41,696 KB
testcase_22 AC 132 ms
41,172 KB
testcase_23 AC 130 ms
41,392 KB
testcase_24 AC 132 ms
41,388 KB
testcase_25 AC 134 ms
41,832 KB
testcase_26 AC 128 ms
41,240 KB
testcase_27 AC 119 ms
41,008 KB
testcase_28 AC 134 ms
41,536 KB
testcase_29 AC 136 ms
41,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.Scanner;


public class Main_yukicoder735 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		double r = sc.nextDouble();
		double d = sc.nextDouble();

		pr.printf("%.7f%n", Math.sqrt(d * d - r * r));
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}
0