题目 1118: Tom数【两行代码】 摘要:解题思路:[int(i) for i in input()] :将输入的数字字符串转换为列表,其实就是迭代的过程sum() :对列表内的数据进行求和注意事项:无参考代码:while True: …… 题解列表 2022年05月06日 0 点赞 0 评论 1230 浏览 评分:9.9
字符统计——三个for循环搞定 摘要:####思路: 1.利用辅助数组,遍历字符串统计每个字符出现的次数 2.用临时变量max,遍历数组,求出最多出现次数 3.再遍历一次数组,出现次数等于max的都输出 ####具体代码: ``…… 题解列表 2022年05月06日 2 点赞 2 评论 1425 浏览 评分:9.5
[编程入门]自定义函数之字符串反转 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;string s;int main(){ cin>>s; for(int i=…… 题解列表 2022年05月06日 0 点赞 0 评论 396 浏览 评分:0.0
[编程入门]自定义函数之字符串连接 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;string s,b;int main(){ cin>>s>>b; cout<…… 题解列表 2022年05月06日 0 点赞 0 评论 417 浏览 评分:0.0
蓝桥杯算法提高-输出二进制表示 题解 摘要:解题思路:用位运算和&来转换。注意事项:无。参考代码:#include<bits/stdc++.h>using namespace std;int n;int main(){ scanf("%d…… 题解列表 2022年05月06日 0 点赞 0 评论 431 浏览 评分:0.0
[编程入门]二维数组的转置 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int a[10][10];int main(){ for(int i=0;i…… 题解列表 2022年05月06日 0 点赞 0 评论 402 浏览 评分:0.0
[编程入门]自定义函数处理素数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;long long a;int main(){ cin>>a; for(int…… 题解列表 2022年05月06日 0 点赞 0 评论 360 浏览 评分:0.0
三个字符串的排序 摘要:解题思路:直接排序,暴力。注意事项:sort(里a是加3);参考代码:#include<bits/stdc++.h>using namespace std;string a[3]; int main(…… 题解列表 2022年05月06日 0 点赞 0 评论 440 浏览 评分:0.0
[编程入门]数字逆序输出 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;long long a[15];int main(){ for(int i=0…… 题解列表 2022年05月06日 0 点赞 0 评论 376 浏览 评分:0.0
蓝桥杯算法训练VIP-最长字符串 题解 摘要:解题思路:就直接输入字符串数组,用字符串长度打擂台,找到长度最大的字符串,输出。注意事项:要用字符串数组。参考代码:#include<bits/stdc++.h>using namespace std…… 题解列表 2022年05月06日 0 点赞 0 评论 426 浏览 评分:0.0