結果

問題 No.3001 確率論ってこういうものですよね
ユーザー Lepton_sLepton_s
提出日時 2015-02-11 00:45:28
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 229 bytes
コンパイル時間 439 ms
コンパイル使用メモリ 60,504 KB
実行使用メモリ 5,256 KB
最終ジャッジ日時 2023-09-05 23:06:35
合計ジャッジ時間 1,106 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <algorithm>
using namespace std;

int main(){
	double a, b;
	cin>>a>>b;
	b = 1.0-b;
	if(a>b) swap(a, b);
	cout.precision(10);
	cout<<a<<" "<<(a+b<1.0+1e-9?0.0:max(0.0, (a+b-1)/a))<<endl;
	return 0;
}
0