#K71867. Taco Pair Sum
Taco Pair Sum
Taco Pair Sum
You are given n pairs of integers. For each pair \((a_i, b_i)\), compute the sum \(a_i + b_i\). Your task is to find and output the maximum sum among all the given pairs.
Input Constraints: The first line contains an integer \(n\) representing the number of pairs. Each of the next \(n\) lines contains two space-separated integers \(a_i\) and \(b_i\), which can be positive, negative or zero.
Example:
Input: 3 1 3 4 1 2 2</p>Output: 5
Note that the sums are computed as \(a_i + b_i\) for each pair, and you must select the maximum value among these sums.
inputFormat
The input is provided via standard input (stdin). The first line contains an integer (n), the number of pairs. This is followed by (n) lines, each containing two space-separated integers (a_i) and (b_i).
outputFormat
Output a single integer to standard output (stdout) which represents the maximum value of (a_i + b_i) among all the pairs.## sample
3
1 3
4 1
2 2
5