[Solution] Max minus Min CodeChef Solution
Problem
Chef is given integers and such that .
Chef needs to find the value of .
Here denotes the maximum value among while denotes the minimum value among .
Input Format
- The first line of input will contain a single integer , denoting the number of test cases.
- Each test case consists of integers .
Output Format
For each test case, output the value of .
👇👇👇👇👇
Explanation:
Test case : Here, and . Thus, the difference is .
Test case : Here, and . Thus, the difference is .
Test case : Here, and . Thus, the difference is .
Test case : Here, and . Thus, the difference is .
No comments:
Post a Comment