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).
Related problems
- Even Numbers Up To N — Easy
- Greeting — Easy
- Sum of Two — Easy
- Tip Total — Easy
- Leap Year — Easy
- Reverse a String — Easy