The Hound vs. The Mountain

3.8

8 votes
Problem

The Hound and his brother the Mountain are engaged in a fight against each other in King's Landing. At the end of the fight, one dies and the other wins. They both are given a decimal number each in the 8 bit binary representation A and B. These numbers will decide their fate in the following manner:

  1. If A^B <= B^A, then the Hound is declared as the winnner and the Mountain dies.

2.But if A^B >B^A, then the Mountain wins and the Hound dies.

Your task is to calculate and print the winner's name as output.

Input:: Input the number of testcases T in the first line. Followed by T lines, each line with input A and B.

Output: The name of the winner as "The Hound" or "The Mountain".

Sample Input
7
00111011 01100101
00110011 11001100
01010101 10101010
01011100 10100111
11111100 01011000 
00101101 11001011
00101010 10101010
Sample Output
The Mountain
The Mountain
The Mountain
The Mountain
The Hound
The Mountain
The Mountain
Time Limit: 5
Memory Limit: 256
Source Limit:
Contributers:
Editor Image

?