結果

問題 No.3001 確率論ってこういうものですよね
ユーザー kyuridenamidakyuridenamida
提出日時 2014-12-25 23:57:04
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 378 bytes
コンパイル時間 1,327 ms
コンパイル使用メモリ 143,260 KB
実行使用メモリ 4,388 KB
最終ジャッジ日時 2023-09-03 18:14:50
合計ジャッジ時間 2,188 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 RE -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
/*
最大値と最小値逆にしてた!!!!!!!!!!!というのはあまり問題ではなさそう...もうだめだ
*/
int main(){
	double X,Y;
	cin >> X >> Y;
	assert(X>0);
	double a = X;
	double b = (1-Y);
	if( X == 0 ){
		printf("0.0 0.0\n");
	}else printf("%.16lf %.16lf\n",max(a*b,1-Y),min(a*b,1-Y));
	
}
0