2846: 统计数字字符个数 摘要:解题思路:注意事项:要输入字符0到字符9参考代码:#include <bits/stdc++.h>using namespace std;char s[100000];int main(){ i…… 题解列表 2023年10月28日 0 点赞 0 评论 268 浏览 评分:0.0
阶乘求和记录,第一次用int没过,数据太大,改用long long类型 摘要:解题思路:遍历求阶乘注意事项:参考代码:#include<stdio.h> int main() { int m,i,j; long long sum=0; scan…… 题解列表 2023年10月28日 0 点赞 0 评论 252 浏览 评分:0.0
2853: 字符替换 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;char s[100000],a,b;int main(){ cin>>s;…… 题解列表 2023年10月28日 0 点赞 0 评论 226 浏览 评分:0.0
2329: 信息学奥赛一本通T1177-奇度单增序列 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<bits/stdc++.h> using namespace std; int main() { …… 题解列表 2023年10月28日 0 点赞 0 评论 370 浏览 评分:0.0
2330: 信息学奥赛一本通T1178-成绩排序 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<bits/stdc++.h> using namespace std; struct dev { …… 题解列表 2023年10月28日 0 点赞 0 评论 493 浏览 评分:0.0
整数去重(两种方法) 摘要:第一种是直接去掉重复元素(跟之前去掉空格那个思路一样): 参考代码: ```c #include int main() { int n; scanf("%d",&n); int …… 题解列表 2023年10月28日 0 点赞 0 评论 466 浏览 评分:0.0
完数的判断代码记录 摘要:解题思路:1.第一次用数组储存因子,无效数字的因子也会添加到数组里,时间超限2.第二次放弃数组,老老实实遍历注意事项:参考代码:用数组的代码,用到了指针,定义数组长度与输入数字相等#include<s…… 题解列表 2023年10月29日 0 点赞 0 评论 337 浏览 评分:0.0
错误探测(用一二维数组储存行和列里1的数量,再判断二维数组里的元素是否为偶数,定义两个变量存储需要变的元素的行和列坐标,再定义一个变量判断是否需要变元素) 摘要: 参考代码: ```c #include int main() { int n; scanf("%d",&n); int a[n][n]; int ranks[2…… 题解列表 2023年10月29日 0 点赞 0 评论 270 浏览 评分:0.0
矩阵的对角线之和(二种方法) 摘要:参考代码: 第一种: ```c #include int main() { int a[5][5],Diagonal1=0,Diagonal2=0; for(int i=0;i…… 题解列表 2023年10月29日 0 点赞 0 评论 330 浏览 评分:0.0
python搜索,开两个数组记录同行同列 摘要: a,b=map(int,input().split()) while a!=-1 and b!=-1: c=[] d=[0 for x in range(a)] e…… 题解列表 2023年10月29日 0 点赞 0 评论 282 浏览 评分:0.0