C语言训练-1135 求s=a+aa+aaa+aaaa+aa...a的值-题解(C++代码)这方法绝了 摘要:解题思路:题目给出范围是1~9,所以可以开一个原始数组,里面存放1,在之后的n次循环时乘上a,把结果累加起来注意事项:sum赋初值0,数组大小大不要太小不要参考代码:/* 1135 */ #in…… 题解列表 2020年08月25日 0 点赞 0 评论 607 浏览 评分:9.9
字符串的输入输出处理-题解(C++代码) 摘要:解题思路:注意事项:注意空格输出,我写了很多次,总是格式错误,下方代码是对的(亲测)。参考代码:#include <iostream> #include <cstring> using names…… 题解列表 2020年08月25日 0 点赞 2 评论 985 浏览 评分:7.3
统计成绩-题解(C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){ int a[10],count=0; double sum=0; for…… 题解列表 2020年08月25日 0 点赞 0 评论 423 浏览 评分:0.0
蓝桥杯算法提高VIP-和最大子序列-题解(C++代码)dp+最小子问题分解 摘要:`把问题拆解为小的子问题` ` 比如只有两个数 3,-2 只需要考虑3加上-2和不加两种情况` `如果有三个数3,-2,3只需要考虑3,-2的最大子序列加上3和不加两种情况` `建立一个与序列等…… 题解列表 2020年08月25日 0 点赞 2 评论 306 浏览 评分:6.0
二级C语言-进制转换-题解(Python代码) 摘要:解题思路:python中数值型变量好像只能是十进制形式表示,其他类型变量只能以字符串形式存在,可以通过format函数将int类型变量转换成其他进制字符串注意事项:只知道format函数,然后就自以为…… 题解列表 2020年08月25日 0 点赞 3 评论 821 浏览 评分:9.2
边长判断-题解(C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c);…… 题解列表 2020年08月25日 0 点赞 0 评论 412 浏览 评分:0.0
回文判断-题解(C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){ char a[100]; scanf("%s",&a); int l=s…… 题解列表 2020年08月25日 0 点赞 0 评论 396 浏览 评分:0.0
数字整除-题解(C++代码) 摘要:解题思路:注意要考虑大数的储存,我用的是,字符转数字的方法。而且解题考虑最终结果就好,过程尽量简单。注意事项:参考代码:#include <iostream>#include <cstring>usi…… 题解列表 2020年08月25日 0 点赞 0 评论 735 浏览 评分:5.6
奇数个数-题解(C语言代码) 摘要:解题思路:注意事项:除以二的数是偶数;参考代码:#include <stdio.h>#include <string.h>int main(){ char a[50]; scanf("%s",&a);…… 题解列表 2020年08月25日 0 点赞 0 评论 613 浏览 评分:5.0
求总时间-题解(C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n; double time,sum=0; scanf("%d",&n); time=30; for(…… 题解列表 2020年08月25日 0 点赞 0 评论 375 浏览 评分:0.0