分解质因数——python解法 (暴力BF) 解题思路:因为是分解质因数,先把小于等于b的所有质数找出来存到nums中用来备用,这样直接查表就可以了;观察结果,如果a-b中的数i本身就是质数不用分解直接3=3这种的(i在nums中因为质数的定义是只能分解为1和其本身两个因数),如果不在就是非质数, 题解列表 2022年02月22日 0 点赞 0 评论 797 浏览 评分:9.9
编写题解 1221: 数列问题 摘要:解题思路:注意事项:参考代码:ls=[3,4,5]n=int(input())for i in range(n-3): ls.append(ls[-1]+ls[-2]+ls[-3])print(…… 题解列表 2022年02月22日 0 点赞 0 评论 601 浏览 评分:0.0
编写题解 1219: 数列排序 摘要:解题思路:注意事项:参考代码:n=int(input()) for i in range(n): ls=list(map(int,input().split())) t=ls[0…… 题解列表 2022年02月22日 0 点赞 0 评论 548 浏览 评分:0.0
编写题解 1216: 成绩转换 摘要:解题思路:注意事项:参考代码:while True: try: n=int(input()) if 0<=n<=59: &nbs 题解列表 2022年02月22日 0 点赞 0 评论 794 浏览 评分:0.0
编写题解 1214: 恺撒密码 摘要:解题思路:注意事项:参考代码:dic={ 'A': 'V', 'B': 'W', 'C': 'X…… 题解列表 2022年02月22日 0 点赞 0 评论 701 浏览 评分:8.0
编写题解 1213: 幸运儿(python代码) 摘要:解题思路:注意事项:参考代码:while True: try: n=int(input()) ls=list(range(1,n+1)) …… 题解列表 2022年02月22日 0 点赞 0 评论 636 浏览 评分:0.0
二级C语言-最小绝对值 解题思路:注意事项:参考代码:a=list(map(int,input().split()))b=[abs(i)foriina]index=b.index(min(b))a[index],a[9]=a[9],a[index]foriina:print(i,end='') 题解列表 2022年02月22日 0 点赞 0 评论 531 浏览 评分:0.0
1050: [编程入门]结构体之成绩记录 摘要:解题思路:注意事项:参考代码:n = eval(input())s = []for i in range(n): s.append(input())for i in s: l = '…… 题解列表 2022年02月22日 0 点赞 0 评论 473 浏览 评分:0.0
1211: 平方和与立方和 摘要:解题思路:注意事项:参考代码:while True: try: A,B=map(int,input().split()) pin,li=0,0 …… 题解列表 2022年02月22日 0 点赞 0 评论 763 浏览 评分:0.0
1049: [编程入门]结构体之时间设计 解题思路:先给出大致公式,然后再细分不同的情况进行处理注意事项:参考代码:y,m,d=map(int,input().split())num=30*(m-1)+dforiinrange(1,m):ifiin[1,3,5,7,8,10,12]:num+=1ifm>2:num-=2if((y%4==0)a 题解列表 2022年02月22日 0 点赞 0 评论 519 浏览 评分:0.0