結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
57,196 KB
testcase_01 AC 135 ms
57,148 KB
testcase_02 AC 137 ms
56,876 KB
testcase_03 AC 141 ms
57,040 KB
testcase_04 AC 134 ms
56,704 KB
testcase_05 AC 135 ms
56,960 KB
testcase_06 AC 145 ms
56,868 KB
testcase_07 AC 138 ms
57,172 KB
testcase_08 AC 140 ms
57,148 KB
testcase_09 AC 135 ms
56,924 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(x+y-1,0);
		double amax = Math.min(x+y,Math.min(x,y));
		System.out.println((x-amin) + " " + (x-amax));
	}

}
0