计算数字个数---详细讲解---(Python) 摘要:Python 通过遍历字符串判断字符是否为数字 ```python n=input() s=0 for i in n: if i.isdigit(): s=s+1…… 题解列表 2021年11月04日 0 点赞 0 评论 613 浏览 评分:9.9
自定义函数处理最大公约数与最小公倍数 摘要:解题思路:注意事项:参考代码: def yue(a,b): min =(a<b and a or b) i=min while i>0: if a%i==0 and…… 题解列表 2021年11月04日 0 点赞 1 评论 641 浏览 评分:9.9
[编程入门]三个数找最大值---两种方法---(Python) 摘要:Python 1.通过max求最大值: ```python list=list(map(int,input().split())) print(max(list)) ``` 2.通过if-…… 题解列表 2021年11月04日 0 点赞 0 评论 1470 浏览 评分:9.9
[编程入门]三个数最大值---两种方法---(Python) 摘要:Python 1.通过max求最大值: ```python list=list(map(int,input().split())) print(max(list)) ``` 2.通过if-…… 题解列表 2021年11月04日 0 点赞 0 评论 805 浏览 评分:8.0
1255: 蓝桥杯算法提高-能量项链 DP解决 摘要: n = int(input()) a = list(map(int, input().split())) a.extend(a) a.append(a…… 题解列表 2021年11月04日 0 点赞 0 评论 553 浏览 评分:9.9
2^k进制数代码详细说明 摘要:解题思路:找到规律即可注意事项:主要要注意分段后可能剩下的不能组成k位的数值取值情况参考代码:import mathk,w=map(int,input().split())a=math.ceil(w/…… 题解列表 2021年11月03日 0 点赞 0 评论 388 浏览 评分:9.9
[编程入门]同因查找---for循环---(Python) 摘要:```python for i in range(10,1001): if i%2==0 and i%3==0 and i%7==0: print(i) ``` 通过…… 题解列表 2021年11月03日 0 点赞 1 评论 871 浏览 评分:9.9
[编程入门]等差数列---for循环---(Python) 摘要:Python 每个数相差了3,所有每次循环对s都加上3用sum累加 ```python n=int(input()) sum=2 s=2 for i in range(1,n): …… 题解列表 2021年11月03日 0 点赞 0 评论 1123 浏览 评分:9.9
[编程入门]有规律的数列求和---for循环---(Python) 摘要:Python a等于b,b等于a+b ```python n=int(input()) a,b=1,2 sum1=0 for i in range(n): sum1+=float…… 题解列表 2021年11月03日 0 点赞 0 评论 342 浏览 评分:9.9
[编程入门]水仙花数判断---for循环---(Python) 摘要:Python 满足if条件为水仙花数将数值输出 ```python for i in range(100,1000): if i==((i%10)**3)+((i//10%10)**3…… 题解列表 2021年11月03日 0 点赞 0 评论 653 浏览 评分:6.7