甲流疫情死亡率(C++简单解) 摘要:代码解析:sum通过static_cast(b)/a*100对进行强制转换就可以得到正确结果啦注意事项:要进行强制转换,要不然你的b/a*100,会出现0的情况。参考代码:#include<iostr…… 题解列表 2023年07月23日 0 点赞 0 评论 1072 浏览 评分:9.9
鸡兔同笼问题(C++简单解) 摘要:假设鸡的数量为a,兔的数量为b。根据题目中给定的条件,可以列出以下方程:a + b = x (头的总数量)2a + 4b = y (脚的总数量)参考代码:#include <iostream>usin…… 题解列表 2023年07月23日 2 点赞 0 评论 962 浏览 评分:9.9
想看奥本海默 摘要:#include<iostream>#include<cmath>using namespace std;int main(void){ float x,x1=1.00; float a;…… 题解列表 2023年07月23日 0 点赞 0 评论 244 浏览 评分:9.9
1199: 哥德巴赫曾猜测 摘要:解题思路:#include <bits/stdc++.h>using namespace std;int add(int n){ for(int i=2;i<n;i++) if(n…… 题解列表 2023年07月23日 0 点赞 0 评论 257 浏览 评分:9.9
1045 暴力解 摘要:#include<iostream>using namespace std;int s[10];int a,b;int da=0,xiao=10050;int main(void){ for(i…… 题解列表 2023年07月23日 0 点赞 0 评论 296 浏览 评分:9.9
用 for(auto & c:s)遍历字符串并赋值 摘要:解题思路: 字符串遍历注意事项: getline取空格参考代码:#include<iostream>#include<cstring>using na…… 题解列表 2023年07月23日 0 点赞 0 评论 258 浏览 评分:9.9
2997: 梯形面积 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;int main(){ float s = (15+2…… 题解列表 2023年07月22日 0 点赞 0 评论 310 浏览 评分:6.0
2955: 判决素数个数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;long long n,m,b,sum=0;int pdsushu(int x){…… 题解列表 2023年07月22日 0 点赞 0 评论 289 浏览 评分:9.9
1852: 求1+2+3+...+n的值 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;long long n,m,b,sum=0;long long gaosi(lon…… 题解列表 2023年07月22日 0 点赞 0 评论 291 浏览 评分:9.9
1852: 求1+2+3+...+n的值 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;long long sum(long long n){ long long …… 题解列表 2023年07月22日 0 点赞 0 评论 170 浏览 评分:0.0