自定义函数之数字分离 摘要:解题思路:注意事项:注意审题,是每个数字间用空格隔开参考代码:number = input()for i in number: print(int(i), end = " ")…… 题解列表 2023年11月16日 0 点赞 0 评论 462 浏览 评分:9.9
蓝桥杯2014年第五届真题-斐波那契(Python题解) 摘要:解题思路:注意事项:参考代码:while True: try: n,m,p = map(int,input().split()) M = [[1,1],[1,0]] …… 题解列表 2023年11月16日 0 点赞 0 评论 748 浏览 评分:9.0
自定义函数之字符提取 摘要:text = input()t = "aeiou"r = ""for i in text: if i in t: r += iprint(r)…… 题解列表 2023年11月16日 0 点赞 0 评论 506 浏览 评分:0.0
简单C语言训练-数字母 ```pythons=input()c=0foriins:ifi.isalpha()://isalpha寻找字母c+=1print(c)```直接用isalpha查找很方便快捷记住这个 题解列表 2023年11月15日 0 点赞 0 评论 541 浏览 评分:0.0
金币内置for循环 摘要:解题思路:注意事项:参考代码:n = int(input())sum = 0coin_per = 0day = 0q = 0while n > q: day += 1 coin_per +…… 题解列表 2023年11月14日 0 点赞 0 评论 633 浏览 评分:9.9
储蓄简单方法 解题思路:注意事项:参考代码:sum=0list1=[]count=0sum_mom=0flag=1#若不破产flag=1foriinrange(12):#12个月sum=sum+300#零花钱每次都加上300元n=int(input())#输入花销sum-=n#零花钱减花销whilesum>=100 题解列表 2023年11月14日 0 点赞 0 评论 590 浏览 评分: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 评论 523 浏览 评分:0.0
链表报数问题(Python) 摘要:解题思路:注意事项:参考代码:def find_last_person(n): people = list(range(1, n + 1)) current = 0 # 当前报数人的…… 题解列表 2023年11月13日 0 点赞 0 评论 599 浏览 评分:0.0
python编写a%b 解题思路:跟a+b一样的思路只是改运算符,具体注意事项参照a+b参考代码:whileTrue:try:a,b=map(int,input().strip().split())print(a%b)except:break 题解列表 2023年11月13日 0 点赞 0 评论 530 浏览 评分:0.0
python编写a+b 摘要:解题思路:用while语句让它一直循环,不然直接打印会只对百分之五十。while语句有始有终,需要用break跳出注意事项:注意代码前面空格的位置参考代码:while True: try: …… 题解列表 2023年11月13日 3 点赞 0 评论 1572 浏览 评分:0.0