[Solution] Final Population CodeChef Solution
Problem
There were initially million people in a town, out of which million people left the town and million people immigrated to this town.
Determine the final population of town in millions.
Input Format
- The first line of input will contain a single integer , denoting the number of test cases.
- The first and only line of each test case consists of three integers , and .
👇👇👇👇👇
Output Format
For each test case, output the final population of the town in millions.
Explanation:
Test case : The initial population of the town was million, out of which million people left and million people entered the town. So, final population million.
Test case : The initial population of the town was million, out of which million left and million immigrated. The final population is thus million.
No comments:
Post a Comment