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

25881번 - Electric Bill 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB14831146107577.172%

문제

To encourage customers to conserve energy (and protect the environment), the electric companies typically have a lower rate for the first 1000 kilowatt-hour (KWH) of electric usage and a higher rate for the additional usage (KWH is a derived unit of energy equal to 3.6 megajoules).

Given the rate (per KWH) for the first 1000 KWH usage, the rate (per KWH) for the additional usage, and a customer’s energy consumption, you are to determine the charges (bill) for the customer.

입력

The first input line contains two integers (each between 2 and 20, inclusive), indicating the rate/KWH for the first 1000 KWH and the rate/KWH for the additional usage, respectively. The next input line contains a positive integer, n, indicating the number of customers to process. Each of the following n input lines contains an integer (between 1 and 50000, inclusive), indicating a customer’s energy consumption.

출력

For each customer, print the energy consumption, followed by a space, followed by the charges.

제한

예제 입력 1

6 10
4
1000
1001
700
4800

예제 출력 1

1000 6000
1001 6010
700 4200
4800 44000

힌트

출처

University > University of Central Florida > 2017 Local Programming Contest 1번

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

출처

대학교 대회

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

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