For practice 3


Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type
Allowed languages
C, C++, Python3

This practice problem will require you to programme basic for loops.

Your very good friends Tom and Jerry are playing dice, and they want you to be the judge. Similar to what you've done in csci125p003, your good friend Tom and Jerry has decided that a single match with 2 dice is not enough for determining the winner.

For each round, you will see the numbers Tom and Jerry rolled. And there are the rules:

1. If one player's total points is greater than the other, that player
    wins.

2. If two players' points are the same, and one player has two dice with the
    same number while the other doesn't, then that player wins.

3. Otherwise, it is a tie.

The winner is to be chosen after 3 rounds. The player that wins the most rounds wins the game.

Input Specification

The first line will contain two space-separated integers whose absolute value ranges from 1 to 6. These are the two dice rolled by Tom.

The second line will contain two space-separated integers whose absolute value ranges from 1 to 6. These are the two dice rolled by Jerry.

The process will repeat for 3 rounds.

Output Specification

Output either the winner's name, or It is a Tie!.

Sample Input

1 1
2 1
4 4
3 2
3 6
2 4

Sample Output

Tom

Comments

There are no comments at the moment.