結果

問題 No.450 ベー君のシャトルラン
ユーザー GrenacheGrenache
提出日時 2016-12-01 12:56:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 684 bytes
コンパイル時間 3,542 ms
コンパイル使用メモリ 74,108 KB
実行使用メモリ 41,612 KB
最終ジャッジ日時 2024-05-05 16:35:02
合計ジャッジ時間 6,968 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
41,176 KB
testcase_01 AC 106 ms
40,332 KB
testcase_02 AC 112 ms
41,428 KB
testcase_03 AC 102 ms
40,352 KB
testcase_04 AC 114 ms
41,324 KB
testcase_05 AC 117 ms
41,500 KB
testcase_06 AC 114 ms
41,280 KB
testcase_07 AC 111 ms
41,260 KB
testcase_08 AC 111 ms
41,424 KB
testcase_09 AC 102 ms
40,432 KB
testcase_10 AC 116 ms
41,252 KB
testcase_11 AC 112 ms
41,440 KB
testcase_12 AC 116 ms
41,356 KB
testcase_13 AC 115 ms
40,424 KB
testcase_14 AC 131 ms
41,612 KB
testcase_15 AC 109 ms
40,204 KB
testcase_16 AC 117 ms
40,336 KB
testcase_17 AC 114 ms
41,324 KB
testcase_18 AC 109 ms
40,812 KB
testcase_19 AC 104 ms
40,424 KB
testcase_20 AC 115 ms
41,344 KB
testcase_21 AC 118 ms
41,368 KB
testcase_22 AC 117 ms
41,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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


public class Main_yukicoder450 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int vl = sc.nextInt();
		int vr = sc.nextInt();
		int d = sc.nextInt();
		int w = sc.nextInt();

		double t = (double)d / (vl + vr);
		double ret = t * w;

//		pr.printf("%.7f\n", ret);
		pr.println(ret);
	}

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

		solve();

		pr.close();
		sc.close();
	}

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