题库练习 Mahmoud and Ehab and the even-odd game
← 上一题 下一题 →

A11737 | Mahmoud and Ehab and the even-odd game

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

Mahmoud and Ehab play a game called the even-odd game. Ehab chooses his favorite integer $n$ and then they take turns, starting from Mahmoud. In each player's turn, he has to choose an integer $a$ and subtract it from $n$ such that:

- $1<=a<=n$ .
- If it's Mahmoud's turn, $a$ has to be even, but if it's Ehab's turn, $a$ has to be odd.

If the current player can't choose any number satisfying the conditions, he loses. Can you determine the winner if they both play optimally?

输入格式

The only line contains an integer $n$ $(1<=n<=10^{9})$ , the number at the beginning of the game.

输出格式

Output "Mahmoud" (without quotes) if Mahmoud wins and "Ehab" (without quotes) otherwise.

输入输出样例

输入 #1
1
输出 #1
Ehab
输入 #2
2
输出 #2
Mahmoud
C++ 编辑器
输入
输出