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

7796번 - Indomie 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB318827.586%

문제

During recession, Felix needs to queue for SembakoPlus. Sembako, as we all know, stands for “Sembilan Bahan Pokok” which consists of 9 kinds of item: Rice, Sugar, Cooking-oil, Meat, Egg, Milk, Corn, Kerosene and Iodized Salt. SembakoPlus consists of Sembako and one more item: Indomie! Felix’s favorite of all time!! (therefore, no wonder why he could stand for this long queue)

Each person in the queue is allowed to pick only one item. No need to ask, Felix wants only Indomie. Unfortunately, they are running out of SembakoPlus stock and currently there are three kinds of item left: Rice, Sugar and Indomie. As he could see from afar, he is quite sure that Rice and Sugar will be enough for everybody.

Given the number of remaining Indomie and the number of people queuing in front of Felix, your task is to count the probability that he will get his Indomie. Felix can’t do programming right now as he is very nervous so he can’t think logically. He needs your help!

입력

There will be multiple test cases for this problem. Each test case contains two integers N (1 ≤ N ≤ 50) and S (0 ≤ S ≤ 50), where N is the number of people queuing in front of Felix and S is the remaining number of Indomie.

출력

For each case, print in a single line the probability in percentage that he will get his Indomie with 5 digits precision (he’s being paranoid)

제한

예제 입력 1

2 1
3 2
4 0
4 1
10 10
14 9
30 14

예제 출력 1

50.00000
76.92308
0.00000
33.33333
99.99831
98.65515
95.16071

힌트

출처

ICPC > Regionals > Asia Pacific > Indonesia > Indonesia National Contest > INC 2008 E번

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

출처

대학교 대회

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

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