摘要: 样例输入 4 样例输出 2 3 样例输入 10 样例输出 2 3 5 7 解题代码 n=int(input()) for i in range(2,n): t=1 for a in range(2,i): if i%a==0: t=0 break if t==1: if i!=2: print(" 阅读全文
posted @ 2022-09-21 17:55 淡淡的晓山横雾 阅读(153) 评论(0) 推荐(0)
摘要: 样例输入 49 4 样例输出 4 样例输入 12 3 样例输出 3 解题代码 a,b=map(int,input().split()) if a>b: print(b) else: print(a) 阅读全文
posted @ 2022-09-21 17:52 淡淡的晓山横雾 阅读(185) 评论(0) 推荐(0)
摘要: 提示 90及以上为优秀,80及以上为良好,70及以上为中,60以上为及格,否则不及格 样例输入 95 样例输出 优秀 样例输入 85 样例输出 良好 样例输入 75 样例输出 中 样例输入 65 样例输出 及格 解题代码 a=int(input()) if a>=90: print("优秀") el 阅读全文
posted @ 2022-09-21 17:50 淡淡的晓山横雾 阅读(214) 评论(0) 推荐(0)
摘要: 样例输入 2 样例输出 二月 样例输入 10 样例输出 十月 样例输入 15 样例输出 输入有误 解题代码 a=int(input()) if a==1: print("一月") elif a==2: print("二月") elif a==3: print("三月") elif a==4: pri 阅读全文
posted @ 2022-09-21 17:46 淡淡的晓山横雾 阅读(934) 评论(0) 推荐(0)
摘要: 样例输入 12345 样例输出 不是回文数 样例输入 12321 样例输出 是回文数 样例输入 1321 样例输出 输入有误 解题代码 str=str(input()) if(len(str)!=5): print("输入有误") else: a=0 if str[0]==str[-1] and s 阅读全文
posted @ 2022-09-21 17:44 淡淡的晓山横雾 阅读(215) 评论(0) 推荐(0)
摘要: 样例输入 0.005 样例输出 3.68 样例输入 0.01 样例输出 13.42 解题代码 lev=1.0 count=0 n=float(input()) for i in range(1,366): if count<5: lev*=1+n count+=1 elif count==6: co 阅读全文
posted @ 2022-09-21 17:35 淡淡的晓山横雾 阅读(52) 评论(0) 推荐(0)
摘要: 提示 摄氏度=(华氏度-32)/1.8 华氏度=1.8*摄氏度+32 样例输入 50C 样例输出 122.00F 样例输入 50F 样例输出 10.00C 解题代码 str=str(input()) if str[-1]=='C': a=float((str.split('C'))[0])*1.8+ 阅读全文
posted @ 2022-09-21 17:31 淡淡的晓山横雾 阅读(367) 评论(0) 推荐(0)