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".

Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?