Codechef•Aug 13, 2025
Messi vs Ronaldo
Hazrat Ali
Codechef
Messi has A goals and B assists this season, whereas Ronaldo has X goals and YY assists.
Find out the player with more points this season.
Input Format
- The first and only line of input will contains four space-separated integers A, B, X and Y, the number of goals and assists that Messi has and the number of goals and assists that Ronaldo has, respectively.
Output Format
Print a single line containing:
Messi, if Messi has more points than Ronaldo.Ronaldo, if Ronaldo has more points than Messi.Equal, if both have equal points.
You can print each character in uppercase or lowercase. For example, the strings Messi, MESSI, messi, and MeSSi are considered identical.
Constraints
- 0≤A,B,X,Y≤100
Sample 1:
Input
40 30 50 10
Output
Equal
Solution
A, B, X, Y = map(int, input().split())
messi_points = A * 2 + B
ronaldo_points = X * 2 + Y
if messi_points > ronaldo_points:
print("Messi")
elif messi_points < ronaldo_points:
print("Ronaldo")
else:
print("Equal")