Max of Three
Easy · rating 850 · implementation
Read three space-separated integers on one line. Print the largest.
Editorial
Max of Three returns the largest of three integers — a first look at comparisons. Chained max calls (or a variadic built-in max) read most clearly and avoid nested if-statements.
print(max(a, b, c))Complexity
Time: O(1). Space: O(1).