Back/Parity: Largest Value

Parity: Largest Value

EasyLevel: 2Topic: Math Foundations
XP Reward:+50 XPCoin Reward:+5 Coins

You are given a list of integers. Find the largest value present in the list.

This problem is part of Math Foundations practice and is designed to strengthen the Parity pattern.

Input Format

  • The first line contains an integer n, the number of values.
  • The second line contains n space-separated integers.

Output Format

Return one integer: the maximum value in the list.

Example 1

Input:

7
-26 -13 0 13 26 39 52

Output:

52

Explanation:

  • Scanning all values, the largest one is 52.
  • No other value in the list is greater than it.

Constraints

  • 1 <= n <= 10^5
  • -10^9 <= value <= 10^9

Return Requirement

Implement the starter function for this Easy problem. Read from the raw input string and return only the required answer, with no labels or debug text.

Judge Behavior

Run Code checks the visible sample cases. Submit checks those samples plus additional hidden cases that follow the same input format and constraints.

Loading editor...
Input
7
-26 -13 0 13 26 39 52
Expected Output
52