Solve problem "The largest element" online - Learn Python 3 - Snakify

The largest element


Statement

Given a list of numbers. Determine the element in the list with the largest value. Print the value of the largest element and then the index number. If the highest element is not unique, print the index of the first instance.
Advertising by Google, may be based on your interests

In all the problems input the data using input() and print the result using print().

# Read an integer:
# a = int(input())
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Input:
1 2 3 2 1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Output:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Saved solutions

Tests

InputCorrect answer
1 2 3 2 1
3 2
1 2 3
3 2
1 3 2
3 1
2 1 3
3 2
2 3 1
3 1
3 2 1
3 0
3 1 2
3 0
1 2 3 4 5
5 4
5 4 3 2 1
5 0
-1 -2 -3 -4 -5
-1 0
-5 -4 -3 -2 -1
-1 4
2147483647 2147483646 2147483645
2147483647 0
-2147483648 -2147483647 -2147483646
-2147483646 2
-2147483648 -2147483648 -2147483648
-2147483648 0
-2147483646 -2147483647 -2147483648
-2147483646 0
-100 -100 -100 -100 -100
-100 0
-2147483648 0 2147483647
2147483647 2
2147483647 0 -2147483648
2147483647 0
-79 92 70 72 28 45 37 -86 -12 0 -27 -14 -69 63 -68 74 45 49 96 -20
96 18
53 14 53 -77 -31 48 51 49 -73 -23 -19 93 85 -50 -73 59 67 -99 98 11
98 18
-2147483648
-2147483648 0