题解列表

筛选

第十三次作业2题

摘要:解题思路:利用桶排序思想计数注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int tong[100000];int main(){    ……

2846: 统计数字字符个数

摘要:解题思路:注意事项:要输入字符0到字符9参考代码:#include <bits/stdc++.h>using namespace std;char s[100000];int main(){    i……

2853: 字符替换

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;char s[100000],a,b;int main(){    cin>>s;……

整数去重(两种方法)

摘要:第一种是直接去掉重复元素(跟之前去掉空格那个思路一样): 参考代码: ```c #include int main() { int n; scanf("%d",&n); int ……

完数的判断代码记录

摘要:解题思路:1.第一次用数组储存因子,无效数字的因子也会添加到数组里,时间超限2.第二次放弃数组,老老实实遍历注意事项:参考代码:用数组的代码,用到了指针,定义数组长度与输入数字相等#include<s……