Comparing Rooms
Time limit1sMemory limit1024 MB
Given two rectangles' side lengths, the task is to print M, P, or E depending on which room has the larger area or whether the areas are equal.
- Level
Easy1 of 10
- Topics
- Implementation, Math
- Solved
- No attempts yet
Problem
Masha and Petya want to find out whose room is bigger. Masha's room is a rectangle measuring by meters, and Petya's room is a rectangle measuring by meters.
Write a program that determines whose room is bigger: Masha's or Petya's.
Input
Four natural numbers , , , and are given on one line, separated by spaces ().
Output
If Masha's room is bigger, print the Latin letter M. If Petya's room is bigger, print the Latin letter P. If the two rooms have the same area, print the Latin letter E.