No.2706 One Nafmo
問題文最終更新日: 2024-03-12 22:32:24
English (AI translation)
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
Problem Statement
A $1$ dozen pencil set contains $12$ pencils, whereas a $1$ Nafmo pencil set contains $A$ pencils. A $1$ Nafmo set is sold for $B$ yen.
Nafmo-kun wants to obtain at least $X$ pencils by buying some number of Nafmo sets.
Find the minimum amount of money, in yen, that Nafmo-kun needs in order to obtain at least $X$ pencils.
Input
$A\ B \ X$
- $1 \leq A,B,X \leq 1000$
- All inputs are integers.
Output
Compute and output the minimum amount of money needed to obtain at least $X$ pencils.
Sample
Sample 1
Input
12 300 1
Output
300
Since $1$ Nafmo is a set of $12$ pencils, it suffices to buy $1$ Nafmo for $300$ yen.
Sample 2
Input
10 100 11
Output
200
$1$ Nafmo is not enough, so buy $2$ Nafmo.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
sepa38