C++求1+2!+3!+...+N!的和 两次解决第一次是int类型,导致越界改成longlong即可```cpp#includeusingnamespacestd;typedeflonglongll;intmain(){llsum=0,num=1;llN;cin>>N;for(inti=1;i 题解列表 2021年12月14日 0 点赞 0 评论 707 浏览 评分:0.0
编写题解 2004: 统计成绩 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a[10]; for(int i=0;i<10;i…… 题解列表 2021年12月14日 0 点赞 0 评论 504 浏览 评分:0.0
编写题解 1065: 二级C语言-最小绝对值 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int main(){ int a[10]; for…… 题解列表 2021年12月14日 0 点赞 0 评论 551 浏览 评分:0.0
1065: 二级C语言-最小绝对值 摘要:#include<bits/stdc++.h> using namespace std; int main(){ vector<int> a(10,0),b(10,0); …… 题解列表 2021年12月13日 0 点赞 0 评论 664 浏览 评分:0.0
1070: 二级C语言-成绩归类 摘要:#include<bits/stdc++.h> using namespace std; int main(){ vector<int> students; int x;…… 题解列表 2021年12月13日 0 点赞 0 评论 721 浏览 评分:0.0
1069: 二级C语言-寻找矩阵最值 摘要:#include<bits/stdc++.h> using namespace std; int main(){ int n,x; cin >> n; int …… 题解列表 2021年12月13日 0 点赞 0 评论 631 浏览 评分:0.0
1068: 二级C语言-温度转换 摘要:直接循环打印。#include<bits/stdc++.h> using namespace std; int main(){ int C; double F; …… 题解列表 2021年12月13日 0 点赞 0 评论 584 浏览 评分:0.0
1066: 二级C语言-自定义函数 摘要:直接使用pow()函数即可解决。#include<bits/stdc++.h> using namespace std; double fact(int &n){ double su…… 题解列表 2021年12月12日 0 点赞 0 评论 586 浏览 评分:0.0
编写题解 1165: 明明的随机数(C++) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstdio> #include<set> using namespace std; set<int> s…… 题解列表 2021年12月12日 0 点赞 0 评论 631 浏览 评分:9.9
编写题解 1159: 偶数求和(C++) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstdio> using namespace std; int main(){ int a,b,n=0…… 题解列表 2021年12月12日 0 点赞 0 评论 1179 浏览 评分:0.0