1117: K-进制数 ```cpp#includeusingnamespacestd;intK;intcl(intnum,intfront){inttemp=0;for(inti=(front==0?1:0);i1)temp+=cl(num-1,i);elsetemp++;}returntemp;}intmain(){in 题解列表 2022年09月11日 0 点赞 0 评论 542 浏览 评分:9.9
1118: Tom数(c++代码) ```cpp#include#includeusingnamespacestd;intmain(){char*str;inttom;while(cin>>str){tom=0;intlen=strlen(str);for(inti=0;i 题解列表 2022年09月11日 0 点赞 1 评论 843 浏览 评分:9.9
1120: C语言训练-"水仙花数"问题2 简简单单,回味无穷```cpp#includeusingnamespacestd;ints3(intg){returng*g*g;}intmain(){for(inti=100;i 题解列表 2022年09月11日 0 点赞 0 评论 645 浏览 评分:9.9
1121: C语言训练-8除不尽的数 只是计算```cpp#includeusingnamespacestd;intmain(){cout 题解列表 2022年09月11日 0 点赞 0 评论 783 浏览 评分:9.9
贪心算法—局部最优解(C语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #define max(x,y) x>y?x:y #define V 17//移动速度 #define sk 60//技能移动距…… 题解列表 2022年09月12日 2 点赞 1 评论 1623 浏览 评分:9.9
2905: 最大值和最小值的差(max_element) 摘要:解题思路:一个最简单的思路,把输入的数扫描一遍,找到最大值和最小值,相减即可。需要注意将两个变量初始化。参考代码:#include<iostream> #include<set> using na…… 题解列表 2022年09月14日 1 点赞 0 评论 1383 浏览 评分:9.9
科创社每日一题 该题需要知道的东西 解题思路:这道题主要考察了字符串函数的使用,在这里我给大家写一下字符串函数的模拟实现,让大家更加理解字符串函数,从而让大家使用的更舒服首先说一下字符串函数有哪些1、strlen求字符串函数的长度2、strcmp(str1,str2)比较str1与str2如果str1>str2返回1如果相等就返回0否则 题解列表 2022年09月14日 0 点赞 0 评论 707 浏览 评分:9.9
三个字符串的排序 题解 摘要:解题思路:进行的题目不是很难,只要你逻辑够清晰就能很顺利的做出来我们做过三个数比大小 有 a , b , c如果 a大于b就让 他俩的值交换,这样就可以确保a < b了然后再让a和c比较 如果a > …… 题解列表 2022年09月14日 0 点赞 0 评论 852 浏览 评分:9.9
1196: 去掉空格 ps:用最简单话解释这道题 ```c#include#includeintmain(){chararr[100][100];//定义一个二维数组。inti=0,k=0,j=0;/*首先说明一下endoffile不是指字符串,而是在键盘上输入ctrl+z在按回车->结束*/while(gets(arr[i])){i++;k=i;/ 题解列表 2022年09月14日 0 点赞 0 评论 997 浏览 评分:9.9
三个字符串的排序 超级笨办法 枚举 摘要:解题思路:用if else结构不断地比较大小,我主要用了二维数组,但是也可以用三个一维数组注意事项:不要忘记你是要从小到大排序还是从大到小排序,也不要漏掉任何一种排序的可能参考代码:#include<…… 题解列表 2022年09月14日 0 点赞 1 评论 602 浏览 评分:9.9