简单C语言训练-数字母 摘要:```python s=input() c=0 for i in s: if i.isalpha(): //isalpha寻找字母 c+=1 print(c) …… 题解列表 2023年11月15日 0 点赞 0 评论 417 浏览 评分:0.0
金币内置for循环 摘要:解题思路:注意事项:参考代码:n = int(input())sum = 0coin_per = 0day = 0q = 0while n > q: day += 1 coin_per +…… 题解列表 2023年11月14日 0 点赞 0 评论 498 浏览 评分:9.9
储蓄简单方法 摘要:解题思路:注意事项:参考代码:sum = 0list1 = []count = 0sum_mom = 0flag = 1 #若不破产flag = 1for i in range(12): #12个月 …… 题解列表 2023年11月14日 0 点赞 0 评论 496 浏览 评分:6.0
深搜dfs,python不容易过 摘要:d=[(-1,-2),(1,-2),(-2,-1),(2,-1),(-2,1),(2,1),(-1,2),(1,2)] def dfs(x,y,s): global res if…… 题解列表 2023年11月13日 0 点赞 0 评论 389 浏览 评分:0.0
链表报数问题(Python) 摘要:解题思路:注意事项:参考代码:def find_last_person(n): people = list(range(1, n + 1)) current = 0 # 当前报数人的…… 题解列表 2023年11月13日 0 点赞 0 评论 485 浏览 评分:0.0
python编写a%b 摘要:解题思路:跟a+b一样的思路只是改运算符,具体注意事项参照a+b参考代码:while True: try: a,b=map(int,input().strip().split()) print(a…… 题解列表 2023年11月13日 0 点赞 0 评论 417 浏览 评分:0.0
python编写a+b 摘要:解题思路:用while语句让它一直循环,不然直接打印会只对百分之五十。while语句有始有终,需要用break跳出注意事项:注意代码前面空格的位置参考代码:while True: try: …… 题解列表 2023年11月13日 3 点赞 0 评论 1434 浏览 评分:0.0
矩阵对角线求和 摘要: x1,x2,x3 = map(int,input().split()) x4,x5,x6 = map(int,input().split()) x7,x8,x9 = map(int,inp…… 题解列表 2023年11月12日 0 点赞 0 评论 665 浏览 评分:6.0
成绩排序(Python实现) 摘要:解题思路:注意事项:参考代码:def sort_students(students): students.sort(key=lambda x: (x[2], x[0], x[1])) re…… 题解列表 2023年11月12日 0 点赞 0 评论 510 浏览 评分:0.0
自由下落的距离计算 摘要:解题思路:每次经过的路程均为高度的3倍注意事项:参考代码:m,n=map(int,input().split())c=0for i in range(1,n+1): m=m/2 c+=3*…… 题解列表 2023年11月12日 0 点赞 0 评论 440 浏览 评分:0.0