题解列表

筛选

python 简单易懂的求平均年龄-题解

摘要:解题思路:  用for循环来输入注意事项: 输入的是个整数(int)参考代码: n = int(input());s=k=0for i in range(n):    x = int(input())……

2793: 点和正方形的关系

摘要:解题思路:注意事项:参考代码:x,y = map(int,input().strip().split())if (x > 1 or x < -1) or (y > 1 or y < -1):    p……

编写题解:数的读法【Python】

摘要:解题思路:每四位分开读,具体见代码和注释参考代码:d = {&#39;1&#39;:&#39;yi&#39;, &#39;2&#39;:&#39;er&#39;, &#39;3&#39;:&#39;s……

编写题解:分解质因数【Python】

摘要:解题思路:首先自定义函数判断是否为质数;分解质因数时:先找最小质因数flag,然后递归找n//flag的最小质因数参考代码:# 自定义函数来判断是否是质数 def isPrime(n):     ……

约瑟夫环重新写一遍

摘要:解题思路:注意事项:最后li2=[3,6,1,5,2,8,4,7]参考代码:n,m=map(int,input().split())li=[]li2=[]for i in range(1,n+1): ……

菜鸟首次尝试(python)超简单解法

摘要:解题思路:先写个输入,再用for循环来表示饥行,count_hang来记录行数,最后打印出来就行注意事项:参考代码:n=int(input())count_hang=0for i in range(n……