영어 원문입니다. 원문의 수식·표를 글자로 옮겨 모양이 다를 수 있습니다. 정확한 내용은 원문 페이지에서 확인하세요. 원문 페이지 열기 (새 창)
Problem
The use of incandescent light bulbs will soon be banned within the European Union, but it can already be profitable to use low energy lamps. Your task is to write a program that, given for how long a light is on each day and the price of electricity, computes after how many days the total cost of ownership (the purchasing price of the lamp plus the cost of electricity) is lower for the low energy lamp compared to the incandescent light bulb for the first time.
We assume the following data:
| Incandescent bulb | Low energy lamp | |
| Power (watt) | 60 | 11 |
| Life (hours) | 1000 | 8000 |
| Price (Swedish kronor) | 5 | 60 |
For simplicity, we assume that each lamp has the exact given life. This means that if you only need to have a light on for 1000 hours you only need a single incandescent bulb, while you need two if you use it for 1001 hours, since the first breaks after 1000 hours.
The cost of electricity K for a lamp that is on for H hours can be computed with the formula
K = (E · H · P)/100000
where E is the power of the lamp in watt and P is the price of electricity (in hundredths of a krona per kilowatt-hour).
In every test case, it is guaranteed that the low energy lamp becomes cheaper within 8000 hours, i.e. you will never have to buy an additional low energy lamp.
Input
The first and only line of input contains two integers h (1 ≤ h ≤ 24) and P (1 ≤ P ≤ 200), the number of hours per day the lamp is on, and the price of electricity.
Output
Print an integer: the number of days after which the low energy lamp is cheaper than the incandescent bulb.
Scoring
Your solution will be tested on a set of test groups. To earn points for a group, you must pass all test cases in that group.
| Group | Points | Constraints |
|---|---|---|
| 1 | 33 | You will only have to purchase a single incandescent bulb before the low energy lamp becomes cheaper. |
| 2 | 67 | No additional constraints. |
Explanation of Sample
After 149 days, the cost of the incandescent bulb is 71.32840 kronor (of which the cost of purchasing two bulbs is 10), and with the low energy lamp 71.24354 kronor (of which the cost of purchasing a single lamp is 60).
예제
예제 1
7 98
149