本文主要是介绍PTA L1-063:吃鱼还是吃肉 (python),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
一、题目要求
二、参考代码
n=int(input())
for i in range(n):s=input().split()if s[0]=='1':if int(s[1])<130:print('duo chi yu!',end=' ')elif int(s[1])==130:print('wan mei!',end=' ')else:print('ni li hai!',end=' ')if int(s[2])<27:print('duo chi rou!')elif int(s[2])==27:print('wan mei!')else:print('shao chi rou!')else:if int(s[1])<129:print('duo chi yu!',end=' ')elif int(s[1])==129:print('wan mei!',end=' ')else:print('ni li hai!',end=' ')if int(s[2])<25:print('duo chi rou!')elif int(s[2])==25:print('wan mei!')else:print('shao chi rou!')
这篇关于PTA L1-063:吃鱼还是吃肉 (python)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!