[Solution] Too many Floors CodeChef Solution | CodeChef Problem Solution 2022
Chef and Chefina are residing in a hotel.
There are floors in the hotel and each floor consists of rooms.
- Floor consists of room numbers to .
- Floor consists of room numbers to .
- Floor consists of room numbers to .
Solution Click Below:- CLICK HERE
You know that Chef's room number is while Chefina's Room number is .
If Chef starts from his room, find the number of floors he needs to travel to reach Chefina's room.
Input Format
- First line will contain , number of test cases. Then the test cases follow.
- Each test case contains of a single line of input, two integers , the room numbers of Chef and Chefina respectively.
Output Format
For each test case, output the number of floors Chef needs to travel to reach Chefina's room.
No comments:
Post a Comment