python,基础运算 摘要:解题思路:注意事项:参考代码:nums = list(map(float, input().strip().split()))x, a, b, c, d = numsfx = a * x ** 3 +…… 题解列表 2024年12月20日 0 点赞 0 评论 338 浏览 评分:0.0
三行解决逆序问题 摘要:解题思路:利用list的切片运算和for循环遍历输出注意事项:使用end=' ',可以实现不换行的遍历输出参考代码:a=list(map(int,input().split()))fo…… 题解列表 2024年12月19日 1 点赞 0 评论 859 浏览 评分:10.0
递归7行解决猴子吃桃 摘要:参考代码:n=eval(input())def peach(m): if m==n: return 1 else: return 2*(peach(m+1)+1…… 题解列表 2024年12月16日 2 点赞 0 评论 782 浏览 评分: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 评论 523 浏览 评分: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 评论 669 浏览 评分:10.0
字典写了一遍 摘要:解题思路:试了试字典写法注意事项:有的慢,还可以优化,个人水平不足,供各位参考参考代码:d=[]d1={}n,m=map(int,input().split())for i in range(n): …… 题解列表 2024年12月08日 0 点赞 0 评论 364 浏览 评分:2.0
无聊的星期五 摘要:while True: x, y = list(map(int, input().split())) if x == 0 and y == 0: break print…… 题解列表 2024年12月06日 0 点赞 0 评论 586 浏览 评分:0.0
python重载练习之复数加减法 摘要:解题思路:注意事项:参考代码:class Complex: def __init__(self, real1, imag1, real2, imag2, op): self…… 题解列表 2024年12月06日 0 点赞 0 评论 352 浏览 评分:0.0
python重载练习之复数加减法 摘要:解题思路:注意事项:参考代码:class Complex: def __init__(self,real=0,imag=0): self.real=real self…… 题解列表 2024年12月06日 0 点赞 0 评论 231 浏览 评分:0.0
不懂可评论 摘要:解题思路:注意事项:参考代码:class Date: def __init__(self): self.__year = 0 self.__mon…… 题解列表 2024年12月04日 0 点赞 0 评论 484 浏览 评分:0.0