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

35006번 - Inflation 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB53412586.207%

문제

In a distant magical kingdom, each wizard was assigned a fixed monthly salary upon starting their service.

However, there was a problem: while the wizard diligently cast spells, prices increased over the year due to inflation.

To curb the rapid rise in prices, the wise king announced on the first day of the first month of the year the final annual inflation rate $p$ and allowed prices to be raised only once a month: exactly one day before the wizards' salaries were paid. The wizards' salaries are paid on the last day of each month.

Moreover, for convenience, he established that there are only ten months in a year, and each month has thirty days. Each month, prices were to rise by exactly $p / 10$ percent of the price of goods at the beginning of the year. Thus, the cost of any good increased by exactly $p$ percent over the year.

The current salary payment system is structured as follows. On the first day of the first month of the year, a salary of $n$ gold is assigned, which they will receive at the end of each month of the year. Additionally, salaries are indexed each year: if the monthly salary in a given year is $n$ gold, and the inflation rate is $p,ドル then the monthly salary for the next year will be $p$ percent higher, that is, it will become $n + (np / 100)$ gold.

Is this an ideal solution? No! The wizards are still dissatisfied: prices rise monthly, while salaries only increase once a year. The wizards propose an alternative called the progressive salary payment system: on the last day of each month, the amount paid as salary has the same purchasing power that the salary of $n$ gold had on the first day of the first month of the year. In other words, for this amount, you can buy exactly the same quantity of any goods that could be purchased for $n$ gold on the first day of the first month.

To assess this injustice, the king has tasked you with determining, based on the wizard's monthly salary at the beginning of the year, how much money they lose over the year under the current salary payment system compared to the progressive salary payment system.

입력

The first line contains two integers $n$ and $p$ separated by a space: the monthly salary of a wizard in gold and the annual inflation rate (10ドル^3 \le n \le 10^5$; 0ドル \le p \le 100$).

출력

Output the amount that the wizard will lose this year compared to the progressive salary payment system. Remember that a year in the magical kingdom consists of ten months. The answer is considered correct if the absolute or relative error does not exceed 10ドル^{-4}$.

제한

예제 입력 1

4346 1

예제 출력 1

239.03

노트

출처

ICPC > Regionals > Northern Eurasia > Northwestern Russia Regional Contest > ICPC 2025-2026 Northwestern Russia Qualification C번

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

출처

대학교 대회

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

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