#C13774. Find Maximum Value in an Array

    ID: 43349 Type: Default 1000ms 256MiB

Find Maximum Value in an Array

Find Maximum Value in an Array

Given a list of integers provided as space‐separated values on a single line from standard input, your task is to determine the largest integer in the list.

If the list is empty, you should output None. Ensure that your solution reads from stdin and writes the result to stdout.

Examples:

  • Input: 1 2 3 4 5 produces output: 5
  • Input: -1 -2 -3 -4 -5 produces output: -1

inputFormat

The input is a single line containing space-separated integers. If the line is empty, it represents an empty array.

outputFormat

Output a single value, which is the largest integer in the given array. If the array is empty, output None.

## sample
1 2 3 4 5
5