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

17046번 - Akvizna 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1.5 초 512 MB97301825.714%

문제

1 vs. 100 is a quiz that we could follow on TVs a few years ago. For the purposes of this task, we will slightly simplify the quiz rules.

The contestant answers questions and has to throw out 100 people who compete against him. Everyone responds to the same question in each round and those who answer the question wrong are thrown out. The amount of money that a competitor who manages to throw out all 100 opponents gets is equal to the sum of money won per round. In each round, all opponents are worth equally and all opponents combined are worth 100 000 kunas (Croatian currency). The amount earned in a round is equal to the sum of the values of people who have been thrown out in that round. For example, if there are 10 opponents at some point, each of them is worth 10 000 kunas, and the contestant will get 30 000 kunas if he or she manages to throw out 3 opponents in that round.

Let's say that the quiz is called 1 vs. N (i.e. the competitor competes against N people) and that Mirko M. managed to throw all the opponents in exactly K rounds. What is the maximum amount he could have won?

입력

In the only line there are the integer numbers N (1 ≤ N ≤ 100 000) and K (1 ≤ K ≤ N), the numbers from the task description.

출력

Print the maximum possible amount that Mirko M. could have won divided by 100 000.

Your answer will be considered correct if relative or absolute difference from the official answer is at most 10-8.

제한

예제 입력 1

5 3

예제 출력 1

2.100000000

예제 입력 2

10 10

예제 출력 2

2.928968254

예제 입력 3

100 10

예제 출력 3

4.590928516

힌트

Mirko M. played against five players that he threw out in three rounds.

In order to win the maximum possible amount, firstly, he had to throw out three opponents and then two more times one at a time.

In that case, the amount won is equal to (3/5 + 1/2 + 1/1) · 100 000 = 2.1 · 100 000 = 210 000 kunas.

출처

Contest > Croatian Open Competition in Informatics > COCI 2018/2019 > Contest #4 5번

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

출처

대학교 대회

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

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