#K69942. Maximum Magic Fruits
Maximum Magic Fruits
Maximum Magic Fruits
You are given several test cases. In each test case, there is a row of trees, each tree bearing a number of magic fruits. Your goal is to determine the maximum number of magic fruits present on any tree in each test case.
Input Format: The first line contains an integer T which denotes the number of test cases. For each test case, the first line contains an integer N representing the number of trees, followed by a line containing N space-separated integers where each integer denotes the number of fruits on a tree.
Output Format: For each test case, output a single line containing the maximum number of fruits found on any tree.
The problem can be formulated mathematically as follows: Given a sequence \(a_1, a_2, \dots, a_N\), compute \(\max_{1 \leq i \leq N} a_i\).
inputFormat
The input begins with a line containing an integer T (1 \(\leq T \leq 10^4</em>), the number of test cases. For each test case:
- The first line contains an integer N (1 \(\leq N \leq 10^5</em>), the number of trees.
- The second line contains N space-separated integers \(a_1, a_2, \dots, a_N\) (\(1 \leq a_i \leq 10^9\)) representing the counts of fruits on each tree.
All input is provided via standard input (stdin).
outputFormat
For each test case, print the maximum number of fruits on any tree. Each answer should be printed on a new line. Output is via standard output (stdout).
## sample1
3
1 5 3
5
</p>