L1-044 稳赢 python

python 实现

num=int(input())

lst=[]
while True:
    s=str(input())
    if s!="End":
        lst.append(s)
    else:
        break

count=0
for item in lst:
    if count!=num:
        if item=="JianDao":
            print("ChuiZi")
        elif item=="ChuiZi":
            print("Bu")
        elif item=="Bu":
            print("JianDao")
        count+=1
    else:
        print(item)
        count=0

 

posted @ 2024-07-03 16:05  豆豆是只乖狗狗  阅读(3)  评论(0编辑  收藏  举报