题解列表

筛选

字符与数字的转换,列表求和

摘要:解题思路:外层循环保证持续输入,列表d需要结束后恢复空列表注意事项:参考代码:while True:    a=int(input())    d=[]    for i in str(a):    ……

2056:汉诺塔(c++代码)

摘要:解题思路:#include<bits/stdc++.h> using namespace std; int A=1,B=2,C=3; void hano(int n) { int i=1;……

阶乘计算python

python自带大整数也可直接暴力求解https://www.bilibili.com/video/BV1oq4y1w7RF?share_source=copy_web这里还是用到列表,用一个数组res存储结果的各个位上的数字,res[0],res[1],res[2]…………分别表示结果的个位,

自定义函数处理素数简便方法

摘要:解题思路:除以不是自己的数循环不为为0不为素数注意事项:参考代码:#include<stdio.h>int main(){    int m,i;    scanf("%d",&m);    for(……

利用ascii表求

摘要:解题思路:注意事项:参考代码:n=int(input())a1=&#39;A&#39;a=&#39;A&#39;for i in range(1,n):    a=chr(ord(a)+1)    a……

巧用upper判断

摘要:解题思路:注意事项:参考代码:a=input()b=input()c=a.upper()d=b.upper()if len(a)!=len(b):    print(&#39;1&#39;)else:……