l = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]while True:a = eval(input('请输入月份(输入0退出):'))if a == 0:exit()try:print('{}月共有{}天'.format(a, l[a-1]))except:print('你的输入有误!')