Given
Let
Input Specification
The standard input will contain 10 datasets. Each dataset begins with an integer
For the first 4 cases,
Output Specification
For each dataset, output the value of
Sample Input (Two Datasets Shown)
Copy
4
1 1
2 2
3 3
4 4
5
1 1
2 1
-2 -1
4 4
-4 -2
Sample Output
Copy
1
2
Educational Computing Organization of Ontario - statements, test data and other materials can be found at ecoocs.org
Comments