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

20233번 - Bicycle 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB23671797170376.095%

문제

After a long time at home during the quarantine, in November you decided to go to work by bicycle! Since you do not have your own bicycle, you have to rent one. The bike rental allows you to choose one of two monthly options:

  • The monthly fee is $a$ roubles. Every day, the first 30ドル$ minutes are free, and every minute above that costs $x$ roubles.
  • The monthly fee is $b$ roubles. Every day, the first 45ドル$ minutes are free, and every minute above that costs $y$ roubles.

There are 21ドル$ working days in November, and you spend $T$ minutes commuting to work and back home in total every day. Calculate how many roubles you would spend if you use either one of two monthly options.

입력

The first four lines of the input contain integers $a,ドル $x,ドル $b,ドル and $y$ (0ドル \leq a, x, b, y \leq 100$), each on a separate line. The last line contains a single integer $T$ (1ドル \leq T \leq 1440$) --- the total time spent on a bicycle during each day.

출력

The only line of the output should contain two integers --- the amount of money you would spend on the first option and the second option, respectively.

제한

예제 입력 1

10
1
20
5
50

예제 출력 1

430 545

예제 입력 2

10
10
10
10
42

예제 출력 2

2530 10

예제 입력 3

10
10
10
10
27

예제 출력 3

10 10

힌트

출처

ICPC > Regionals > Northern Eurasia > Northwestern Russia Regional Contest > ICPC 2020-2021 North-Western Russia Regional Contest B번

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

출처

대학교 대회

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

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