解释很清晰的复杂思路(Python) 摘要:解题思路:(1)输入ISBN号码字符串string(2)根据数字Ascll码的范围分批将9位数字和1位识别码按列表和字符串存储(3)对存储9位数字的列表元素整数化处理,按照规则对元素计算加权和(4)对…… 题解列表 2024年11月29日 0 点赞 0 评论 410 浏览 评分:9.0
调用函数及封装性解题 摘要:解题思路:def f(a): b=(a%10)*5 a=a//10 if (a-b)%17==0: print("1") else:print("0")while…… 题解列表 2024年11月27日 0 点赞 0 评论 516 浏览 评分:9.9
运用封装的方法和调用函数借以解答汽水瓶问题 摘要:解题思路:def f(water): num=0 while True: if water==2: num+=1 break …… 题解列表 2024年11月26日 0 点赞 0 评论 427 浏览 评分:9.9
遍历每条对角线 摘要:# # 遍历每条对角线 m,n = map(int,input().split()) #m行n列 ans = 0 arr = [] for _ in ra…… 题解列表 2024年11月26日 3 点赞 0 评论 1138 浏览 评分:10.0
编写题解 3029: 逆波兰表达式 摘要:inver = input().split() inver = inver[::-1] def arithmetic(inver): if inver: alphabe…… 题解列表 2024年11月25日 0 点赞 0 评论 325 浏览 评分:0.0
编写题解 2330: 信息学奥赛一本通T1178-成绩排序(Python) 摘要:解题思路:利用sorted()函数进行排序注意事项:首先按成绩排序,如果成绩相同则按名字升序参考代码:n = int(input())sc_dict = {}for i in range(n): …… 题解列表 2024年11月23日 0 点赞 0 评论 506 浏览 评分:9.9
不懂可评论 摘要:解题思路:注意事项:参考代码:a,b,c=map(int,input().split()) deter=b*b-4*a*c x1=(-b+deter**0.5)/2*a x2=(-b-deter…… 题解列表 2024年11月23日 0 点赞 0 评论 326 浏览 评分:0.0
不懂可评论 摘要:解题思路:注意事项:参考代码:year=int(input()) if((year%4==0)and(year%100!=0)or(year%400==0)): print("Y") e…… 题解列表 2024年11月23日 0 点赞 0 评论 271 浏览 评分:0.0
不懂可评论 摘要:解题思路:注意事项:参考代码:x=int(input()) for pen4 in range(x//4,-1,-1):#优先买4元的笔,开始循环递减到0结束 remaining=x-pe…… 题解列表 2024年11月21日 0 点赞 0 评论 266 浏览 评分:9.9
不懂可评论 摘要:解题思路:注意事项:参考代码:days= ['Monday', 'Tuesday', 'Wednesday', 'Thursday', …… 题解列表 2024年11月20日 1 点赞 0 评论 333 浏览 评分:0.0