题解列表

筛选

递归7行解决猴子吃桃

摘要:参考代码:n=eval(input())def peach(m):    if m==n:        return 1    else:        return 2*(peach(m+1)+1……

[编程入门]链表合并

摘要:解题思路:注意事项:参考代码:a,b=map(int,input().split())s=[]for i in range(a+b):    x=list(map(int,input().split(……

6行代码解决求和训练

摘要:解题思路:注意事项:参考代码:a, b, c = map(int, input().split())A = sum(range(1, a+1))  # 计算1到a的自然数之和B = sum([i**2……

字典写了一遍

摘要:解题思路:试了试字典写法注意事项:有的慢,还可以优化,个人水平不足,供各位参考参考代码:d=[]d1={}n,m=map(int,input().split())for i in range(n): ……

无聊的星期五

摘要:while True:    x, y = list(map(int, input().split()))    if x == 0 and y == 0:        break    print……

python重载练习之复数加减法

摘要:解题思路:注意事项:参考代码:class Complex:     def __init__(self, real1, imag1, real2, imag2, op):         self……

python重载练习之复数加减法

摘要:解题思路:注意事项:参考代码:class Complex:    def __init__(self,real=0,imag=0):        self.real=real        self……

不懂可评论

摘要:解题思路:注意事项:参考代码:class Date:     def __init__(self):         self.__year = 0         self.__mon……

不懂可评论

摘要:解题思路:注意事项:参考代码:def Compare(a, b):     if isinstance(a, int) and isinstance(b, int):         return……

七行代码解决问题

摘要:解题思路:用字符串解决问题注意事项:无参考代码:a=input()print(len(a))for i in range(len(a)):   print(a[i],end=" ")print()fo……