ArabellaCPC 2019 |
---|
Finished |
Motasem wants to cook n steaks (the steak consists of two faces) for his friends, and each face of the steak needs to be cooked for 5 minutes. Unfortunately, his pans can only fit 2 steaks at a time, and he only has k pans. If Motasem is cooking his steaks optimally, what is the minimum number of minutes he needs to cook all n steaks?
A single line containing two space separated integers $$$n,k$$$ ($$$1\le n,k \le 10^9$$$) represent the number of steaks and pans respectively.
A single integer represents the minimum time needed to cook all steaks
3 1
15
Name |
---|