HEIGHTRATION - Editorial

PROBLEM LINK:

Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4

Tester: Harris Leung
Editorialist: Nishank Suresh

DIFFICULTY:

405

PREREQUISITES:

None

PROBLEM:

Given a fraction of the form \frac{a}{b}, find its height, i.e, the maximum of a and b.

EXPLANATION:

Simply implement what is asked for. In most languages, this can be done with the inbuilt function max. However, you can also use an if condition.

TIME COMPLEXITY

\mathcal{O}(1) per test case.

CODE:

Editorialist's code (Python)
a, b = map(int, input().split())
print(max(a, b))