[编程入门]自定义函数处理素数 摘要:解题思路:注意事项:参考代码:def my_test(m): for i in range(2,m): if m%i==0: n = 1 …… 题解列表 2024年06月03日 0 点赞 0 评论 392 浏览 评分:9.9
简单易懂,看懂给个好评! 摘要:解题思路:注意事项:参考代码:n = int(input())s = 0result = 1for i in range(n): result *= (i+1) s += resultpr…… 题解列表 2024年06月03日 0 点赞 0 评论 624 浏览 评分:9.9
用函数写的 摘要:解题思路:注意事项:参考代码:def get_sum(a=4,b=3): a,b =map(int,input().split()) sum = a%b print(sum)get_…… 题解列表 2024年06月02日 0 点赞 0 评论 565 浏览 评分:9.9
递归法(辗转相除法)求最大公约数 摘要:解题思路:用辗转相除法求最大公约数,在借助最大公约数求最小公倍数注意事项:参考代码:def yue(m,n): if n==0:return m else:return yue(n,m%n…… 题解列表 2024年06月01日 0 点赞 0 评论 493 浏览 评分:9.9
简单易懂,看懂给个好评! 摘要:解题思路:注意事项:参考代码:h = 0q = 0hours = []n = int(input())for i in range(n): q += 1 a, b = map(int, i…… 题解列表 2024年05月26日 2 点赞 0 评论 492 浏览 评分:9.9
无聊的星期六 摘要:n=[[0]*3]*3 for i in range(3): n[i]=list(map(int,input().split())) for i in range(3): pr…… 题解列表 2024年05月25日 0 点赞 0 评论 560 浏览 评分:0.0
无聊的星期六 摘要:n=input() for i in ['a','e','i','o','u']: print('&…… 题解列表 2024年05月25日 0 点赞 0 评论 443 浏览 评分:0.0
无聊的星期六 摘要:n=list(map(int,input().split())) tmp=n[n.index(max(n))] n[n.index(max(n))]=n[9] n[9]=tmp tmp=n[n…… 题解列表 2024年05月25日 1 点赞 0 评论 591 浏览 评分:2.0
无聊的星期六 摘要:n=input() l1=l2=l3=l4=0 for i in range(len(n)): if n[i].isspace(): l1+=1 elif n…… 题解列表 2024年05月25日 0 点赞 0 评论 571 浏览 评分:0.0
无聊的星期六 摘要:#试试python的类来完成,感觉还是C做起来简单 class Student: def __init__(self, id, name,grades): self.…… 题解列表 2024年05月25日 0 点赞 0 评论 449 浏览 评分:0.0