题解列表

筛选

等差数列尼科彻斯定理

摘要:参考代码:/**  * 尼科彻斯定理:任何一个整数m的立方都可以写成m个连续奇数之和  * 示例:13*13*13=2197=157+159+161+163+165+167+169+171+173……

好用的STL双端队列

摘要:#include<bits/stdc++.h> using namespace std; deque<char>q; int main() { char c[100]; while(c……

含k个3的数的解

摘要:解题思路:注意事项:参考代码:m = int(input())k=int(input())if m%19==0:    m=str(m)    count=m.count(&#39;3&#39;)  ……

python方法解决

摘要:解题思路:注意事项:参考代码:import mathl = input().split()s = 0if l[1] == &#39;y&#39;:    s = 5a = int(l[0])if a ……

使用max函数

摘要:解题思路:注意事项:参考代码:l = input().split()  # 读取输入并分割成列表  t = []  # 创建一个空列表    # 使用列表推导式将 l 中的每个字符串转换为浮点数,并添……

模拟计算器(if else)

摘要:解题思路:注意事项:参考代码:l = input().split()a = int(l[0])b = int(l[1])if l[2] == &#39;+&#39;:    print(a+b)eli……

自定义函数求一元二次方程

摘要:解题思路:注意事项:参考代码:import cmathdef greater_p(a,b,c):    p = b**2-4*a*c    x1 = (-b + cmath.sqrt(p)) / (2……