PROBLEM LINK:
Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4
Author: notsoloud
Tester: apoorv_me
Editorialist: iceknight1093
DIFFICULTY:
Cakewalk
PREREQUISITES:
None
PROBLEM:
Chef and Chefina are competing against each other in football - Chef scored X goals and Chefina scored Y.
The winner receives A gold coins, and the loser receives B. How many coins will Chef receive?
EXPLANATION:
If X \gt Y, Chef wins and will receive A gold coins.
Otherwise, X\lt y, and Chef as the loser will receive only B gold coins.
The above condition can be checked using an if statement.
TIME COMPLEXITY:
\mathcal{O}(1) per testcase.
CODE:
Editorialist's code (Python)
a, b, x, y = map(int, input().split())
print(a if x > y else b)