RiseOJ는 solved.ac와 제휴 관계가 없습니다. 티어 아이콘 © solved.ac. solved.ac
포럼
ICPC00024

B. Hey, Better Bettor

스페셜 저지 — 출력을 사용자 정의 프로그램으로 검사하므로 여러 정답이 인정될 수 있습니다.
Unrated 레이팅 미적용
난이도
4s
시간 제한
1024MB
메모리 제한
0
맞았습니다!!
0
제출 수
0.0%
정답률
레이팅

의견: 0

설명

“In the casino, the cardinal rule is to keep them playing and to keep them coming back. The longer they play, the more they lose, and in the end, we get it all.” (from the 1995 film Casino) Recent recessions have not been kind to entertainment venues, including the gambling industry. C\(om- pe\)tition is fierce among casinos to attract players with lots of money, and some have begun to offer especially sweet deals. One casino is offering the following: you can gamble as much as you want at the casino. After you are finished, if you are down by any amount from when you started, the casino will refund \(x\)% of your losses to you. Obviously, if you are ahead, you can keep all of your winnings. There is no time limit or money limit on this offer, but you can redeem it only once. For simplicity, assume all bets cost 1 dollar and pay out 2 dollars. Now suppose \(x\) is 20. If you make 10 bets in total before quitting and only 3 of them pay out, your total loss is 3.2 dollars. If 6 of them pay out, you have gained 2 dollars. Given \(x\) and the percentage probability \(p\) of winning any individual bet, write a program to determine the maximum expected profit you can make from betting at this casino, using any gambling strategy.

제약
입력 형식

The input consists of a single test case. A test case consists of the refund percentage \(x\) (\(0 \le x < 100\)) followed by the winning probability percentage \(p\) (\(0 \le p < 50\)). Both \(x\) and \(p\) have at most two digits after the decimal point.

출력 형식

Display the maximum expected profit with an absolute error of at most \(10^{−}^{3}\).

예제 1
입력
0 49.9
출력
0.0
예제 2
입력
50 49.85
출력
7.10178453
문제 정보

생성자가 기록되지 않았습니다.

출처 ICPC World Finals 2013

평가 및 의견

B. Hey, Better Bettor

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 50 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

B. Hey, Better Bettor

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8