题解列表

筛选

回文串-字符串处理(C++)

摘要:参考代码:#include<cstdio>#include<cstring>const int maxn = 256;   //判断字符串str是否是“回文串”bool judge(char str[……

编写题解 1231: 杨辉三角

摘要:解题思路:注意事项:参考代码:#include "stdio.h" int main() {   int n, i, j;   int a[30][30];   while (scanf("%……

Tom数(水题)

摘要:```c #include int main(){ long long n,sum,i; while(scanf("%lld",&n)!=EOF){ sum=0; ……

自定义函数处理素数

摘要:解题思路:傻瓜解法,遍历2到n注意事项:参考代码:def sushu(n): for i in range(2,n) :    if n%i==0:         print(&#39;not pr……

内码对称问题

摘要:解题思路:注意事项:参考代码:sum1 = 0try:    while True:        x=int(input())        y=format(x,&#39;b&#39;)     ……

switch语句解决成绩评定

摘要:解题思路:    题目首先提出输入不同的分数输出对应的等级,那么一定会用到选择语句(if/else if也可),那么我们就要分析switch中的语法特性,switch后跟常量,在case中找到与swi……