题解列表

筛选

[编程入门]水仙花数判断(简单C语言)

摘要:解题思路:水仙花数只能是三位数,所以先分别求出百位,十位,个位三个数字,再分别求出它们的立方,最后相加和原数字相比较就行,利用for循环从100到1000逐个检查即可注意事项:三个数字的立方和可能会很……

斐波纳契数列解析

摘要:解题思路:数学家斐波纳契在一次兔灾后发现了斐波纳契数列,列举如下:1 1 2 3 5 8 13 21 34 55 89 144...... 细看有规律,比如:1+1=2、1+2=3、2+3=5、3+5……

1079: 射击游戏

摘要:```cpp #include #include #include using namespace std; int n; double dp[7][7][7][7][7][7]; do……

1080: 战场的数目

摘要:```cpp #include #include using namespace std; typedef long long LL; const LL mod=987654321; LL……

耗的时间有点多

摘要:解题思路:注意事项:参考代码:c=[] for i in range(1000,10000):     a=int(i/100)     b=int(i%100)     if (a+b)**……

求大佬只指点

摘要:```c #include #include int main() { int M;//定义输入M scanf("%d", &M); int i; int type[200] ……

字符串逆序

摘要:解题思路:注意事项:参考代码:n=95859 while True:     n+=1     a=str(n)     b=a[::-1]     if a==b:         pr……