Logo
(追記) (追記ここまで)

24853번 - Work or Sleep! 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB47313076.923%

문제

Oleg is a programmer from a planet where there are exactly $T$ hours in a day. Oleg adheres to the principle of "Work or Sleep". According to this principle, all the time that you are not sleeping, you are working.

Recently Oleg has read an article in a scientific journal about the dependence of a programmer's performance on sleep time. The results of the study are the following:

  • If you sleep $T/3$ hours a day, then the performance will be 100ドル\%$.
  • If you sleep $T/6$ hours a day, then the performance will be $X\%$.
  • If you sleep 0ドル$ hours a day, then the performance will be 0ドル\%$.
  • Also, if you sleep from $T/6$ to $T/3$ hours a day, the performance will increase linearly from $X\%$ to 100ドル\%$.
  • Also, if you sleep from $T/6$ to 0ドル$ hours a day, the performance will decrease linearly from $X\%$ to 0ドル\%$.

Oleg decided to structure this information, so he drew a graph of the dependence of performance on sleep time and got the following result:

Oleg believes that the amount of work he will do per day is equal to the product of working time and performance. So, the problem is that if you sleep more, you work less, and if you sleep less, you have less performance.

Oleg wants to get back to work as soon as possible. So, help him determine the maximum possible daily amount of work that he can do with the optimal choice of sleep time.

입력

Input contains two integers $X$ and $T$ --- performance as a percentage if the sleep time is $T/6,ドル and the number of hours per day on Oleg's planet (0ドル \le X \le 100,ドル 1ドル \le T \le 10^5$).

출력

Output a single real number --- the maximum possible daily amount of the work that can be done by Oleg. Your answer will be considered correct if its absolute or relative error doesn't exceed 10ドル^{-6}$.

제한

예제 입력 1

75 24

예제 출력 1

1600.00000000

예제 입력 2

100 24

예제 출력 2

2000.00000000

예제 입력 3

77 123

예제 출력 3

8214.26086957

노트

In the first test case, the maximum amount of the work that could be done if Oleg sleeps for eight hours. In the second test case, Oleg needs to sleep for four hours to maximize his amount of work.

출처

Olympiad > Russian Olympiad in Informatics > Russia High School Programming Contest > Russia High School Programming Contest 2021 K번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /