题解 | 斗兽棋

斗兽棋

https://www.nowcoder.com/practice/0b5afb815f6848d9a7f9c1b0ce514b95

rules = {
    "elephant":"tiger",
    "tiger":"cat",
    "cat":"mouse",
    "mouse":"elephant"
}

s1,s2 = map(str,input().strip().split())

if rules[s1] == s2:
    print("win")
elif rules[s2] == s1:
    print("lose")
else:
    print("tie")

全部评论

相关推荐

评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务