-->
当前位置:首页 > 题库

PROGRAMMING:Let’s Play Tawla

Luz5年前 (2021-05-10)题库625
Tawla is the Arabic name of the game Backgammon. In Tawla, 2 players alternate playing two 6-face dice.
Each die (singular of dice) face represents a number from 1 to 6 through black dots carved on that face.
Tawla professionals give the numbers 1 to 6 special naming, believed to be adapted from another language.
This special naming is as follows:
Tawla is the Arabic name for backgammon. In tavela, two players alternate between two six sided dice. Each die (odd number of dice) face represents a number from 1 to 6 carved through black dots on the t hat face. Tavela professionals gave special names for the numbers 1 to 6, which are believed to have been adapted from another language. The name of this project is as follows:
• 1: “Yakk”
• 2: “Doh”
• 3: “Seh”
• 4: “Ghar”
• 5: “Bang”
• 6: “Sheesh”
Tawla professionals have this habit of saying the dice number after they throw the dice, in order to have
some sort of game commentary. The higher number is said first.
Some examples:
Tavera professionals have the habit of saying the number of the dice after they roll them in order to have some kind of game review. Let's start with the higher numbers. Some examples:
• A dice throw of 1 and 2 is: “Doh Yakk”
• A dice throw of 3 and 5 is: “Bang Seh”
• A dice throw of 6 and 4 is: “Sheesh Ghar”
If you know more about Tawla, you would know that a double (2 dice producing the same number) does
not follow this rule. For some unknown reason, it doesn’t rhyme to say: “Yakk Yakk” or “Doh Doh”. The
following are their special names:
If you know more about tawla, you will know that double (two dice produce the same number) does not follow this rule. For some unknown reason, it says "yakkyakk" or "dohdoh" without rhyme. Th here are their special names:
• A 1-1 dice pair is said: “Habb Yakk”
• A 2-2 dice pair is said: “Dobara”
• A 3-3 dice pair is said: “Dousa”
• A 4-4 dice pair is said: “Dorgy”
• A 5-5 dice pair is said: “Dabash”
• A 6-6 dice pair is said: “Dosh”
One exception to all the above rules is the pair: 5-6 (or 6-5), this one is called “Sheesh Beesh” and not
“Sheesh Bang”! As you may have expected, this is for some unknown reason too.
Write a program that translates dice numbers to Tawla words.
One exception to all the above rules is a pair: 5-6 (or 6-5), which is called "sheesh Beesh", not "sheesh Bang"! As you might expect, it's also for some unknown reason. Write a program that converts dice numbers into tawla words.
###Input format:
Your program will be tested on one or more test cases. The first line of the input will be a single integer T
(1 ≤ T ≤ 100) representing the number of test cases. Followed by T test cases. Each test case will consist
of a single line, containing 2 integers separated by a single space a and b (1 ≤ a, b ≤ 6) representing the
number of black dots carved on the top face of each die.
Your program will be tested on one or more test cases. The first line of input is a single integer t (1 ≤ t ≤ 100) representing the number of test cases. Next is the t-test case. Each test case will be composed of a single line, containing two integers, separated by a space a and B (1 ≤ a, B ≤ 6), indicating the number of black spots carved on the top of each mold.
###Output format:
For each test case print a single line containing “Case n:” (without quotes) where n is the test case number
(starting from 1) followed by a space then the Tawla words describing the given dice numbers.
For each test case, print a single line containing "casen: (without quotation marks), where n is the test case number (starting from 1), followed by a space, and then the tawla word RS describing the given die number.
###Input example:
Here is a set of inputs. For example:
```in
three
1 2
2 3
3 4
```
###Output example:
The corresponding output is given here. For example:
```out
Case 1: Doh Yakk
Case 2: Seh Doh
Case 3: Ghar Seh
```







answer:If there is no answer, please comment