結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 139 ms
56,996 KB
testcase_01 AC 142 ms
56,960 KB
testcase_02 AC 144 ms
57,004 KB
testcase_03 AC 136 ms
57,040 KB
testcase_04 AC 137 ms
57,108 KB
testcase_05 AC 139 ms
57,364 KB
testcase_06 AC 138 ms
57,196 KB
testcase_07 AC 139 ms
57,116 KB
testcase_08 AC 140 ms
57,008 KB
testcase_09 AC 136 ms
57,076 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);
		System.out.println((x-amin) + " " + (x-amax));
	}

}
0