题解列表
X进制减法(C++)
摘要:```cpp
#include
using namespace std;
typedef long long ll;
const int N=1e5+5;
const int MOD=1e9……
[编程入门]有规律的数列求和
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;float seqSum(short n); //有规律数列求和int main()……
[编程入门]求和训练
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c ; cin>>a>>b>>c……
[编程入门]利润计算
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main() { int profit = 0; float a……
[编程入门]分段函数求值
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main() { int x = 0; cin >> x; ……
1007: [编程入门]分段函数求值
摘要:#include<iostream>#include<string.h>using namespace std;int main(){ int x,y; cin>>x; if(x<1) { y=x;……
[编程入门]求和训练
摘要:解题思路:这道题可以分成三步来思考,运用for循环,先求1~a之和(s+=i)再求1~b的平方和(s1+=i*i)最后求1~c的倒数和(s2+=1.0/i)注意事项:s、s1、s2都是double类型……
[编程入门]自定义函数之字符类型统计
摘要:解题思路:因为有四种类型的字符需要统计,所以我们可以建立四个累加器来计算,同时运用for语句扫遍字符串,用if语句判断四种类型(islower(s[i])||isupper(s[i]),isdigit……