結果

問題 No.8001 確率論ってこういうものですよね
ユーザー ぴろずぴろず
提出日時 2014-12-25 23:12:11
言語 Java
(openjdk 23)
結果
AC  
実行時間 170 ms / 5,000 ms
コード長 375 bytes
コンパイル時間 3,505 ms
コンパイル使用メモリ 76,100 KB
実行使用メモリ 43,204 KB
最終ジャッジ日時 2024-06-12 23:23:39
合計ジャッジ時間 4,496 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

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