摘要: python 实现 s=input() year=s[:len(s)-2] month=s[len(s)-2:len(s)] if len(year)==4: print("{year}-{month}".format(year=year, month=month)) else: if int(ye 阅读全文
posted @ 2024-06-29 17:39 豆豆是只乖狗狗 阅读(4) 评论(0) 推荐(0) 编辑
摘要: python 实现 num=int(input()) id_lst=[] for i in range(num): s=str(input()) id_lst.append(s) lst_right=[7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 阅读全文
posted @ 2024-06-29 17:20 豆豆是只乖狗狗 阅读(5) 评论(0) 推荐(0) 编辑
摘要: python 实现 s=input() weight=float(s.split(" ")[0]) height=float(s.split(" ")[1]) ratio=weight/(height*height) print("{:.1f}".format(ratio)) if ratio>25 阅读全文
posted @ 2024-06-29 16:33 豆豆是只乖狗狗 阅读(1) 评论(0) 推荐(0) 编辑
摘要: python 实现 import math num=int(input()) lst=[] for i in range(num): lst.append(int(input())) for i in range(num): flag = 1 for j in range(2, int(math.s 阅读全文
posted @ 2024-06-29 16:27 豆豆是只乖狗狗 阅读(2) 评论(0) 推荐(0) 编辑
摘要: python 实现 s1=input() s2=input() guanzhong1=s1.split(" ")[0] guanzhong2=s1.split(" ")[1] xuanshou1=0 xuanshou2=0 for item in s2.split(" "): if int(item 阅读全文
posted @ 2024-06-29 16:18 豆豆是只乖狗狗 阅读(5) 评论(0) 推荐(0) 编辑