QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 512 MB Total points: 100

#12889. 双陆棋

Statistics

Tawla 是阿拉伯语中对双陆棋(Backgammon)的称呼。在 Tawla 中,两名玩家轮流投掷两枚 6 面骰子。每枚骰子的每个面上都有 1 到 6 个黑点,代表相应的数字。

Tawla 的专业玩家对 1 到 6 的数字有特殊的称呼,据信是从其他语言改编而来的。这些特殊称呼如下:

  • 1: “Yakk”
  • 2: “Doh”
  • 3: “Seh”
  • 4: “Ghar”
  • 5: “Bang”
  • 6: “Sheesh”

Tawla 专业玩家习惯在投掷骰子后说出数字,作为某种游戏解说。他们会先说较大的数字。

一些例子:

  • 投出 1 和 2: “Doh Yakk”
  • 投出 3 和 5: “Bang Seh”
  • 投出 6 和 4: “Sheesh Ghar”

如果你对 Tawla 有更多了解,就会知道“双数”(两枚骰子点数相同)不遵循上述规则。出于某种未知的原因,说 “Yakk Yakk” 或 “Doh Doh” 并不押韵。以下是它们的特殊名称:

  • 1-1 点数对称为: “Habb Yakk”
  • 2-2 点数对称为: “Dobara”
  • 3-3 点数对称为: “Dousa”
  • 4-4 点数对称为: “Dorgy”
  • 5-5 点数对称为: “Dabash”
  • 6-6 点数对称为: “Dosh”

上述所有规则的一个例外是 5-6(或 6-5)点数对,它被称为 “Sheesh Beesh”,而不是 “Sheesh Bang”!正如你可能预料到的,这也是出于某种未知的原因。

编写一个程序,将骰子点数翻译成 Tawla 词汇。

输入格式

程序将在一个或多个测试用例上进行测试。输入的第一行是一个整数 $T$ ($1 \le T \le 100$),表示测试用例的数量。接下来是 $T$ 个测试用例。每个测试用例由单行组成,包含两个由空格分隔的整数 $a$ 和 $b$ ($1 \le a, b \le 6$),分别代表每枚骰子顶面上刻有的黑点数量。

输出格式

对于每个测试用例,打印一行包含 “Case n:”(不含引号),其中 $n$ 是测试用例编号(从 1 开始),后跟一个空格,再接描述给定骰子点数的 Tawla 词汇。

样例

输入 1

3
1 2
2 3
3 4

输出 1

Case 1: Doh Yakk
Case 2: Seh Doh
Case 3: Ghar Seh

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.