[编程入门]三个数找最大值---两种方法---(Python) 摘要:Python 1.通过max求最大值: ```python list=list(map(int,input().split())) print(max(list)) ``` 2.通过if-…… 题解列表 2021年11月04日 0 点赞 0 评论 1681 浏览 评分:9.9
[编程入门]三个数最大值---两种方法---(Python) 摘要:Python 1.通过max求最大值: ```python list=list(map(int,input().split())) print(max(list)) ``` 2.通过if-…… 题解列表 2021年11月04日 0 点赞 0 评论 1026 浏览 评分:8.0
1255: 蓝桥杯算法提高-能量项链 DP解决 摘要: n = int(input()) a = list(map(int, input().split())) a.extend(a) a.append(a…… 题解列表 2021年11月04日 0 点赞 0 评论 761 浏览 评分:9.9
2^k进制数代码详细说明 摘要:解题思路:找到规律即可注意事项:主要要注意分段后可能剩下的不能组成k位的数值取值情况参考代码:import mathk,w=map(int,input().split())a=math.ceil(w/…… 题解列表 2021年11月03日 0 点赞 0 评论 613 浏览 评分: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 评论 1108 浏览 评分: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 评论 1324 浏览 评分: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 评论 568 浏览 评分: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 评论 976 浏览 评分:6.7
[编程入门]求和训练---for循环---(Python) 摘要:```python a,b,c=map(int,input().split()) sum1=0 for i in range(1,a+1): sum1+=i for i in ran…… 题解列表 2021年11月03日 0 点赞 0 评论 751 浏览 评分:9.9
[编程入门]Sn的公式求和---for循环---(Python) 摘要:解题思路:注意事项:range是从零开始的,s,sn有初值参考代码:n=int(input())s=0sn=0for i in range(1,n+1): s=s*10+2 sn+=spr…… 题解列表 2021年11月03日 0 点赞 0 评论 1119 浏览 评分:8.0