RCB and Playoffs solution codechef
Team RCB has earnedpoints in the games it has played so far in this year’s IPL. To qualify for the playoffs they must earn at least a total of points. They currently have games left, in each game they earn points for a win, point for a draw, and no points for a loss.
2021 was approaching and the world was about to end. So 2 gods Saurabhx and Saurabhy (from Celesta) created the Cyberverse. But this time disappointed with humans both the gods decided not to have humans in this world. So they created a world of cyborgs. A world without humans. Isn’t it interesting? So let us dive into the cyberverse and have a look at their problems.
Find the value of the minimum number of weapons a kid cyborg can have when all the weapons are distributed among them.
- The first line contains an integer , denoting the number of test cases.
- Each of the next lines will contain two space-separated integers denoting and respectively.
- For each test case ,output a single line containing an integer denoting the minimum number of weapons a kid cyborg can have in that test case.
1 5 8
- There are kids and weapons.
- Hence we will distribute the weapons such that kids have weapons each and the remaining kids have weapon each.
- Hence the minimum number of weapons a kid cyborg has is . ( That is, = )