1146-舍罕王的失算(等比数列的应用) 摘要:解题思路:1,2,4,8...2^63-1为一等比数列等比数列的前n项和公式:Sn=a1(1-q^n)/(1-q),q!=11)q=2,a1=1,n=64=>S=1*(1-2^64)/(1-2)=2^…… 题解列表 2022年10月10日 0 点赞 0 评论 389 浏览 评分:0.0
1147-角谷猜想(代码简洁,思路清晰) 摘要:解题思路:注意事项:0是自然数、偶数、整数,不是正整数,所以不考虑0 参考代码:#include<iostream>using namespace std;int main(){ int n,…… 题解列表 2022年10月10日 0 点赞 0 评论 506 浏览 评分:0.0
温 度 转 换 摘要: #include #include using namespace std; int main() { float f,c; c…… 题解列表 2022年10月10日 0 点赞 0 评论 553 浏览 评分:0.0
分段函数求值 摘要: #include using namespace std; int main() { int x, y; cin >> x; …… 题解列表 2022年10月10日 0 点赞 0 评论 414 浏览 评分:0.0
1149-计算1~N之间所有奇数之和(代码简洁,思路清晰) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n,res=0; cin >>n; f…… 题解列表 2022年10月10日 0 点赞 0 评论 471 浏览 评分:0.0
成 绩 评 定 摘要: #include using namespace std; int main() { int n; cin >> n; if …… 题解列表 2022年10月10日 0 点赞 0 评论 427 浏览 评分:0.0
1150-计算t=1+1/2+1/3+...+1/n(代码简洁,思路清晰) 摘要:解题思路:注意事项:除法运算结果要是浮点数,那么被除数和除数至少有一个是浮点数 参考代码:#include<iostream>using namespace std;int main(){ …… 题解列表 2022年10月10日 0 点赞 0 评论 460 浏览 评分:0.0
利 润 计 算 摘要: #include using namespace std; int main() { int x, sum; cin >> x; …… 题解列表 2022年10月10日 0 点赞 0 评论 443 浏览 评分:0.0
最大公约数与最小公倍数 摘要: #include using namespace std; int main() { int m, n ,x,y,r; cin >> m …… 题解列表 2022年10月10日 0 点赞 0 评论 299 浏览 评分:0.0
1151-计算一个整数N的阶乘(代码简洁,思路清晰) 摘要:解题思路:注意事项:/*1) 12的阶乘4 7900 1600 int:[-2147483648,2147483647] =>int数据可以存储最终的阶乘 */参考代码:#include<iostre…… 题解列表 2022年10月10日 0 点赞 0 评论 496 浏览 评分:0.0