递归7行解决猴子吃桃 摘要:参考代码:n=eval(input())def peach(m): if m==n: return 1 else: return 2*(peach(m+1)+1…… 题解列表 2024年12月16日 2 点赞 0 评论 694 浏览 评分:10.0
[编程入门]链表合并 摘要:解题思路:注意事项:参考代码:a,b=map(int,input().split())s=[]for i in range(a+b): x=list(map(int,input().split(…… 题解列表 2024年12月11日 0 点赞 0 评论 450 浏览 评分:0.0
6行代码解决求和训练 摘要:解题思路:注意事项:参考代码:a, b, c = map(int, input().split())A = sum(range(1, a+1)) # 计算1到a的自然数之和B = sum([i**2…… 题解列表 2024年12月08日 1 点赞 3 评论 556 浏览 评分:10.0
字典写了一遍 摘要:解题思路:试了试字典写法注意事项:有的慢,还可以优化,个人水平不足,供各位参考参考代码:d=[]d1={}n,m=map(int,input().split())for i in range(n): …… 题解列表 2024年12月08日 0 点赞 0 评论 277 浏览 评分:2.0
无聊的星期五 摘要:while True: x, y = list(map(int, input().split())) if x == 0 and y == 0: break print…… 题解列表 2024年12月06日 0 点赞 0 评论 458 浏览 评分:0.0
python重载练习之复数加减法 摘要:解题思路:注意事项:参考代码:class Complex: def __init__(self, real1, imag1, real2, imag2, op): self…… 题解列表 2024年12月06日 0 点赞 0 评论 258 浏览 评分:0.0
python重载练习之复数加减法 摘要:解题思路:注意事项:参考代码:class Complex: def __init__(self,real=0,imag=0): self.real=real self…… 题解列表 2024年12月06日 0 点赞 0 评论 163 浏览 评分:0.0
不懂可评论 摘要:解题思路:注意事项:参考代码:class Date: def __init__(self): self.__year = 0 self.__mon…… 题解列表 2024年12月04日 0 点赞 0 评论 408 浏览 评分:0.0
不懂可评论 摘要:解题思路:注意事项:参考代码:def Compare(a, b): if isinstance(a, int) and isinstance(b, int): return…… 题解列表 2024年12月04日 0 点赞 0 评论 249 浏览 评分:9.9
七行代码解决问题 摘要:解题思路:用字符串解决问题注意事项:无参考代码:a=input()print(len(a))for i in range(len(a)): print(a[i],end=" ")print()fo…… 题解列表 2024年12月03日 0 点赞 0 评论 1042 浏览 评分:3.5