-Code
t, o = map(int, input().split())
for _ in range(int(input())):
e = int(input())
res = 0
if e > 1000:
res += t * 1000 + (e - 1000) * o
else:
res += t * e
print(e, res)
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 15372번 A Simple Problem. (1) | 2022.10.28 |
---|---|
[백준/파이썬] 11368번 A Serious Reading Problem (0) | 2022.10.27 |
[백준/파이썬] 25858번 Divide the Cash (0) | 2022.10.25 |
[백준/파이썬] 25704번 출석 이벤트 (0) | 2022.10.24 |
[백준/파이썬] 25630번 팰린드롬 소떡소떡 (0) | 2022.10.23 |