题解列表

筛选

校门外的树

摘要:解题思路:从0到500依次标记,筛选出符合区间内的数记为-1;统计总数-值为负的数注意事项:共501参考代码:#include <stdio.h>#include <stdlib.h>#define ……

简单易懂,看看吧

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;bool isprime(int n){ for (int i = 2; i < n; ++i……

简单易懂a+b

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){    int a,b;    while(cin>>a>>b)    ……

DNA-题解(拆分法)

摘要:解题思路:参考样例输出,我们可将“DNA”拆分为两大部分分别打印。即:先打印第一行,再用b循环打印其余内容。注意事项:数据n,a,b的取值范围第一行与每次b循环中最后一行的空格数与数据a之间的关系中间……

密码截获1209

摘要:解题思路:稍微有些麻烦了,但很好理解注意事项:参考代码:#include<stdio.h>#include<string.h>int m,x,y;int judge(char s1[1000]) { ……