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

32305번 - Farmers’ Market 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
5 초 (추가 시간 없음) 1024 MB26422120283.471%

문제

Dr. Meade went to the local Farmers’ Market to get some fresh fruits. Most stores expected the customers to put fruits in bags and then the customers would be charged based on how much each bag weighs. Dr. M was exhausted from grading the final exams and, fortunately, he found a store where apples were already prepackaged!

All bags have the same number of apples (say, 5 apples in each bag) and you pick as many bags as you want. But, rather than charging you by the number of bags or their weights, the store charges you by how many dozens of apples you have! If your total count is not a multiple of dozens, you are still charged for dozens. For example, if each bag has 5 apples and you pick 4 bags (i.e., 20 apples total), you are charged for 24 (two dozens) apples since 20 is not a multiple of dozens.

Given how many apples there are in each bag, number of bags Dr. M has picked and the cost for a dozen of apples, determine how much Dr. M has to pay.

입력

The first input line contains two integers: a (1 ≤ a ≤ 20), indicating the number of apples in each bag and b (1 ≤ b ≤ 20), indicating how many bags Dr. M has picked. The second input line contains an integer, d (1 ≤ d ≤ 20), indicating the cost for a dozen of apples.

출력

Print how much Dr. M has to pay.

제한

예제 입력 1

5 4
10

예제 출력 1

20

예제 입력 2

5 6
15

예제 출력 2

45

예제 입력 3

16 3
20

예제 출력 3

80

힌트

출처

University > University of Central Florida > 2024 Local Programming Contest (Qualifying Round) 1번

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

출처

대학교 대회

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

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