题解列表

筛选

字符串--2.找第一个只出现一次的字符

摘要:解题思路:注意事项:遇到求字符串中类似于字符个数这种题,想到先用strlen(str),后用双循环挨个进行比较;参考代码:#include<stdio.h> #include<string.h> ……

字符串--3.基因相关性

摘要:解题思路: 得用scanf("%s",str)输入字符串,用gets(str)会结果错误,原因可能是复制输入字符的时候有空格;区别:scanf("%s",str)---遇到空格就停止;        ……

最小公倍数——辗转法

摘要:解题思路:辗转相除法注意事项:参考代码:a,b = map(int,input().split())c,d = a,bif a>b:    a,b = b,ar = a%b while r !=0: ……

 编写题解 2764: 带余除法

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int a, b;    scanf("%d %d",&a,&b);    printf("%d %d",……

编写题解 2778: 判断数正负

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int N;    scanf("%d",&N);    if(N>0)    {        prin……

五位、六位回文数

摘要:n=int(input()) s=[] for i in range(1,10):     for j in range(0,10):         for k in range(0,10)……

编写题解 2780: 奇偶数判断

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int a;    scanf("%d",&a);    if(a%2==0)    {        p……