+ محدودیت زمان: ۱ ثانیه
+ محدودیت حافظه: ۲۵۶ مگابایت
----------
ARTICLE 137:
***When Hosting, a Bro orders enough pizza for all his Bros.***
![توضیح تصویر](https://quera.org/qbox/view/nH7ppzEqwd/D.png)
When Hosting other friends, it’s important to have enough foods. One easy way is to buy pizzas. We have an equation for calculating number of pizzas: $ p = \left \lceil \frac{h \times b}{8} \right \rceil$ where $p$ is number of pizzas to buy ($\left \lceil \right \rceil $ is Ceil function), $b$ is number of Bros (including the host) and $h$ is the hunger ratio. we have another equation to calculate $hunger$ $ratio:$ $h = \frac{m}{t}$ where $m$ is average gravitational mass of the Bros and $t$ is the time period a Bro will get hungry.
Every Bro have to eat at least $h'$ = ⎣$h$⎦ pieces (⎣ ⎦ is Floor function). Given the variables $m$, $t$ and $b$. Your task is to calculate how many pizzas should the host Bro buy, and what is the maximum number of pieces a single Bro can eat such that his other Bros ate at least $h'$ pieces.
# ورودی
First line of the input contains an integer $T (T ≤ 137)$ indicating number of test cases to follow. Each test case contains three space separated integers indicating variables $m$, $t$ and $b$ $(100≤m≤10000, 1≤ t ≤ m, 1≤ b ≤24)$.
# خروجی
For each test case print a line of output containing two integers separated with a single space indicating number of $pizzas$ to buy and maximum number of pieces a single Bro can eat such that his other Bros ate at least $h'$ pieces.
# مثالها
## ورودی نمونه ۱
```
4
100 20 8
100 20 9
100 19 8
100 19 9
```
## خروجی نمونه ۱
```
5 5
6 8
6 13
6 8
```
ارسال پاسخ برای این سؤال
در حال حاضر شما دسترسی ندارید.