#K1886. Minimum Packet Calculation
Minimum Packet Calculation
Minimum Packet Calculation
You are given the number of participants p, the number of pens (a) and notebooks (b) each participant should receive, and the number of pens (m) and notebooks (n) contained in a single packet. Your task is to determine the minimum number of packets required for pens and notebooks.
In other words, you need to calculate the minimum number of pen packets and notebook packets such that:
- Total pens needed: \( p \times a \)
- Total notebooks needed: \( p \times b \)
The number of packets needed for pens is given by the formula: \( \lceil \frac{p \times a}{m} \rceil \), and for notebooks by \( \lceil \frac{p \times b}{n} \rceil \).
Input is provided as a single line with five space-separated integers. Output the two numbers separated by a space.
inputFormat
The input consists of a single line containing 5 positive integers separated by spaces:
- p (number of participants)
- a (number of pens per participant)
- b (number of notebooks per participant)
- m (number of pens per packet)
- n (number of notebooks per packet)
outputFormat
Output two integers separated by a space. The first integer is the minimum number of pen packets and the second is the minimum number of notebook packets required.
## sample10 3 2 12 11
3 2
</p>