• محدودیت زمان: ۱ ثانیه
  • محدودیت حافظه: ۲۵۶ مگابایت

ARTICLE 137:

When Hosting, a Bro orders enough pizza for all his Bros.

توضیح تصویر

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=h×b8 p = \left \lceil \frac{h \times b}{8} \right \rceil where pp is number of pizzas to buy (\left \lceil \right \rceil is Ceil function), bb is number of Bros (including the host) and hh is the hunger ratio. we have another equation to calculate hungerhunger ratio:ratio: h=mth = \frac{m}{t} where mm is average gravitational mass of the Bros and tt is the time period a Bro will get hungry.

Every Bro have to eat at least hh' = ⎣hh⎦ pieces (⎣ ⎦ is Floor function). Given the variables mm, tt and bb. 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 hh' pieces.

ورودی

First line of the input contains an integer T(T137)T (T ≤ 137) indicating number of test cases to follow. Each test case contains three space separated integers indicating variables mm, tt and bb (100m10000,1tm,1b24)(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 pizzaspizzas to buy and maximum number of pieces a single Bro can eat such that his other Bros ate at least hh' pieces.

مثال‌ها

ورودی نمونه ۱

4
100 20 8
100 20 9
100 19 8
100 19 9
Plain text

خروجی نمونه ۱

5 5
6 8
6 13
6 8
Plain text

ارسال پاسخ برای این سؤال
فایلی انتخاب نشده است.