結果

問題 No.3001 確率論ってこういうものですよね
ユーザー mits58mits58
提出日時 2016-05-05 14:58:41
言語 Java21
(openjdk 21)
結果
AC  
実行時間 193 ms / 5,000 ms
コード長 316 bytes
コンパイル時間 2,347 ms
コンパイル使用メモリ 76,420 KB
実行使用メモリ 55,616 KB
最終ジャッジ日時 2024-04-15 13:12:53
合計ジャッジ時間 5,191 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 181 ms
55,272 KB
testcase_01 AC 192 ms
55,520 KB
testcase_02 AC 181 ms
54,864 KB
testcase_03 AC 193 ms
55,440 KB
testcase_04 AC 182 ms
55,480 KB
testcase_05 AC 181 ms
55,616 KB
testcase_06 AC 183 ms
55,188 KB
testcase_07 AC 191 ms
55,396 KB
testcase_08 AC 183 ms
54,988 KB
testcase_09 AC 186 ms
55,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        while(sc.hasNext()){
        	double x=sc.nextDouble();
        	double y=sc.nextDouble();
        	System.out.println(Math.min(x, 1-y)+" "+(x-Math.min(x, y)));
        }
    }
}
0