結果

問題 No.3001 確率論ってこういうものですよね
ユーザー ぴろずぴろず
提出日時 2014-12-25 23:12:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 144 ms / 5,000 ms
コード長 375 bytes
コンパイル時間 4,151 ms
コンパイル使用メモリ 73,672 KB
実行使用メモリ 57,584 KB
最終ジャッジ日時 2023-09-03 17:56:37
合計ジャッジ時間 6,343 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
56,836 KB
testcase_01 AC 139 ms
57,584 KB
testcase_02 AC 142 ms
57,332 KB
testcase_03 AC 138 ms
56,916 KB
testcase_04 AC 139 ms
56,708 KB
testcase_05 AC 143 ms
56,868 KB
testcase_06 AC 144 ms
56,712 KB
testcase_07 AC 141 ms
57,028 KB
testcase_08 AC 143 ms
57,172 KB
testcase_09 AC 142 ms
56,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package b;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		double x = sc.nextDouble();
		double y = sc.nextDouble();
		double amin = Math.max(Math.max(0,x-1),Math.max(y-1,x+y-1));
		double amax = Math.min(Math.min(1,x),Math.min(y, x+y));
		System.out.print((x-amin) + " " + (x-amax));
	}

}
0