SP16184 CODFURY - Megatron and his rage
Description
Infuriated by the Decepticons' defeat after a long epic battle with the Autobots, Megatron, in his rage, has decided to destroy all the planets on his way back to Cybertron from Earth. There are multiple planets between Earth and Cybertron, and each planet has some number of Autobots to guard it from him. Since Megatron is low on ammo, he wants to fight as few autobots as possible (in fact, not more than "M" of them ) on his way back.
Input Format
You will receive one integer "T" denoting the number of test cases. (T
Output Format
Your output should consist of "T" pairs of space-separated integers, one pair per line, denoting the number of Autobots Megatron will fight and the number of planets he will destroy respectively.