题目描述
小明他们今天在玩斗兽棋的简化版游戏斗兽牌。斗兽牌有四张牌:大象,老虎,猫,老鼠。他们的关系是,大象吃老虎,老虎吃猫,猫吃老鼠,老鼠吃大象。
题目会给你一个字符串,字符串中有两个单词,用空格分隔。分别代表小明出的牌和小明朋友出的牌。现在请你编写代码,帮他们判断最后谁赢得了游戏,如果是小明赢了,则返回 True
(包括赢和平局),否则返回 False
。
输入输出格式
输入格式 一个字符串。
输出格式 True
或 False
。
输入输出样例1
输入 mouse tiger
输出 True
输入输出样例2
输入 cat tiger
输出 False
说明/提示
无
tuple=('elephant','tiger','cat','mouse')
a,b=input().split()
if a==tuple[0]and b==tuple[3]:
print(False)
elif a==tuple[1]and b==tuple[0]:
print(False)
elif a==tuple[2]and b==tuple[1]:
print(False)
elif a==tuple[3]and b==tuple[2]:
print(False)
else:
print(True)