L1-062 幸运彩票 python

python 实现

num=int(input())
lst_res=[]

for i in range(num):
    temp=str(input())
    if int(temp[0])+int(temp[1])+int(temp[2]) == int(temp[3])+int(temp[4])+int(temp[5]):
        lst_res.append("You are lucky!")
    else:
        lst_res.append("Wish you good luck.")
for item in lst_res:
    print("{}".format(item))

 

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