1012: [编程入门]字符串分类统计 摘要:解题思路:这道题就是统计英文字母、数字、空格和其他字符的个数,方法就是遍历输入的字符串,进行判断。注意事项:注意用getline输入。参考代码:#include<bits/stdc++.h>using…… 题解列表 2022年05月13日 0 点赞 0 评论 552 浏览 评分:9.9
1013: [编程入门]Sn的公式求和 摘要:解题思路:这道题可以用循环去模拟它的过程,算出答案。注意事项:注意每个位上的数字为2.参考代码:#include<bits/stdc++.h>using namespace std;long long…… 题解列表 2022年05月13日 0 点赞 0 评论 336 浏览 评分:9.9
思路简单一些吧 摘要:解题思路:大家都用*3-1,还用while,我用的好少,总是用for循环有时候也要换个方法方向注意事项:我没有看出来i*3-1的规律,只知道在前一个数基础上加三。我的程序好理解吗参考代码:n=int(…… 题解列表 2022年05月13日 0 点赞 0 评论 362 浏览 评分:0.0
C语言简单暴力实现,注意要特判x=1的情况 摘要:解题思路:从2开始进行遍历,如果能被整除就说明不是素数,注意循环条件不能<=x,只能<x注意事项:在c语言里面是没有bool 类型的,如果在函数里面直接返回bool类型会报错,建议返回数字类型,或者用…… 题解列表 2022年05月13日 0 点赞 2 评论 1175 浏览 评分:9.9
信息学奥赛一本通T1177-奇度单增序列-题解(各语言代码) 摘要:**python** ```python input() print(*sorted(filter(lambda x:x&1,map(int,input().split()))),sep=','…… 题解列表 2022年05月13日 0 点赞 0 评论 697 浏览 评分:9.4
暴力法求解 摘要:解题思路:注意事项:参考代码: #include<stdio.h> int function(int x){ int i; for(i=2;i<x;i++){ …… 题解列表 2022年05月13日 0 点赞 0 评论 238 浏览 评分:0.0
lf-Hello,world! 普通解法 摘要:解题思路:注意事项:参考代码: #include int main(){ int a; char s; while(scanf("%d",&a)!=EOF){…… 题解列表 2022年05月13日 0 点赞 0 评论 284 浏览 评分:0.0
用了C++中的vector数组 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<vector>using namespace std;vector<int> arr;bool method1(in…… 题解列表 2022年05月13日 0 点赞 0 评论 288 浏览 评分:0.0
纸张尺寸C++ 摘要:```cpp #include using namespace std; int main() { string s; cin>>s; int sz=s[1]-'0'…… 题解列表 2022年05月13日 0 点赞 0 评论 730 浏览 评分:9.9
震惊,缺少两行代码居然是ac和超时的区别!! 摘要:解题思路:注意事项:A^B=x成立时有A^x=B参考代码:#includeusing namespace std;int n,m,l,r,x;const int maxm=100003;int a[m…… 题解列表 2022年05月13日 0 点赞 1 评论 1507 浏览 评分:5.7