简简单单,直接死循环 摘要:解题思路:接使用死循环,里面有两个条件,如果这个自然数都满足双方的要求则直接把求的这个自然数输出即可。 注意事项:找到自然数后,必须使用break来结束死循环,否则会导致宕机或卡顿。参考代码:#inc…… 题解列表 2022年10月21日 0 点赞 0 评论 406 浏览 评分:0.0
深度优先搜索dfs输出全排列 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;const int N = 15;int path[N];bool st[N];int n;…… 题解列表 2022年10月21日 0 点赞 0 评论 336 浏览 评分:0.0
指针实现对数组访问,统计字符串的不同类型 摘要:#include<stdio.h>#include<string.h>#define INPUT_COUNT (100)#define DATA_NULL (char *)(0)#define ERR…… 题解列表 2022年10月22日 0 点赞 0 评论 367 浏览 评分:0.0
规律拆分求解 摘要:解题思路: 规律拆分: 2,22 = 2*10 + 2 ,222= 22 * 10 + 2, 2222 = 222 * 10 + 2.。。。以此类推。注意事项: …… 题解列表 2022年10月22日 0 点赞 0 评论 319 浏览 评分:0.0
字符串翻转秒解决 摘要:#include #include #include using namespace std; //回文串 int main() { string s1; cin>>s1;…… 题解列表 2022年10月22日 0 点赞 0 评论 375 浏览 评分:0.0
题目 1019: [编程入门]自由下落的距离计算—常规求解方法 摘要:解题思路:for循环注意事项:浮点数用float或者double来表示参考代码:#include<stdio.h> #include<math.h> int main(void) { i…… 题解列表 2022年10月22日 0 点赞 0 评论 364 浏览 评分:0.0
aaaaaaaaaaaaaaaaaaa 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n,m,i,j,sum,h; scanf("%d%d",&n,&m); int a[…… 题解列表 2022年10月22日 0 点赞 0 评论 354 浏览 评分:0.0
1164: 数组的距离 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <math.h> int main() { int m = 0, n = 0, f[1001] =…… 题解列表 2022年10月22日 0 点赞 0 评论 257 浏览 评分:0.0
1860: 区间中最大的数 摘要:解题思路:注意事项:参考代码:#include <stdio.h> int main() { int n = 0, arr[1001] = {0}, q = 0; scanf(…… 题解列表 2022年10月22日 0 点赞 0 评论 622 浏览 评分:0.0
代码看着较长,但非常易懂 摘要:参考代码:#include <stdio.h> int main(void) { int N; scanf("%d", &N); int i = 0; for (i = 1; i …… 题解列表 2022年10月22日 0 点赞 0 评论 254 浏览 评分:0.0