IED - Editorial

PROBLEM LINK:

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

Author: notsoloud
Tester: raysh_07
Editorialist: iceknight1093

DIFFICULTY:

TBD

PREREQUISITES:

None

PROBLEM:

Chef and Chefina both sell C items at their stalls.
Chef sells at rupees A per item, Chefina at rupees B. What’s the maximum earning between them?

EXPLANATION:

Chef’s total sales equals A\cdot C, since he sold C items at rupees A each.
Similarly, Chefina’s total sales equals B\cdot C.
The answer is the maximum between them.

TIME COMPLEXITY:

\mathcal{O}(1) per testcase.

CODE:

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