問題一覧 > 通常問題

No.928 Reduced Tax Rate?

レベル : / AI推定難易度 : 1100 / 実行時間制限 : 1ケース 1.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 135
作問者 : Pachicobue / テスター : kopricky
お気に入りにしたユーザー ProblemId : 3564 / 自分の提出
問題文最終更新日: 2019-11-22 23:34:26
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 231 (順位表) の他の問題:

Problem Statement

K is at a certain ramen shop.
This shop sells ramen (before tax) priced at $1円,2円,3円,\dots,(10^9-1)円,10^9円$. More precisely, ramen is sold at every positive integer price from $1$ yen to $10^9$ yen, inclusive.
This shop has two consumption tax rates, $P\%,\ Q\%$. For a ramen priced at $x$ yen, you must pay $\left \lfloor \left(1+\frac{P}{100}\right)x \right \rfloor$ yen when eating in the shop, and $\left \lfloor \left(1+\frac{Q}{100}\right)x \right \rfloor$ yen when taking it out to eat ($\lfloor \cdot \rfloor$ means truncating the fractional part).
Furthermore, when taking it out, you apparently must pay a takeout container fee of $A$ yen in addition to the tax-included price of the ramen. No tax is charged on this container fee.

K wants to buy one ramen and eat it in the shop, and will choose one that satisfies the following condition.

  • The total cost of eating in the shop is lower than the total cost of taking it home to eat.
Among the $10^9$ kinds, find the total number of ramen K can choose.

Input

P Q A

The first line contains the tax rates $P,Q$ and the container fee $A$, separated by spaces.

Constraints

  • $0 \le P,Q \lt 100$
  • $0 \le A \le 10000$
  • All inputs are integers.

Output

Output the total number of ramen K can choose among the $10^9$ kinds.
Print a newline at the end.

Sample

Sample 1
Input
20 0 10
Output
49

It turns out that the prices of ramen satisfying the condition are $1,2,...,49$ yen.

For example, for a ramen priced at $49$ yen, eating in the shop costs $\left \lfloor \left(1+\frac{20}{100}\right)x \right \rfloor = 58$ yen, and taking it home to eat costs $\left \lfloor \left(1+\frac{0}{100}\right)x \right \rfloor + 10 = 59円$. This satisfies the condition.
On the other hand, for a ramen priced at $50$ yen, eating in the shop costs $\left \lfloor \left(1+\frac{20}{100}\right)x \right \rfloor = 60$ yen, and taking it home to eat costs $\left \lfloor \left(1+\frac{0}{100}\right)x \right \rfloor + 10 = 60円$. This violates the condition.

Sample 2
Input
10 8 30
Output
1473

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。