1045: [编程入门]自定义函数之整数处理 摘要:解题思路:注意事项:参考代码:#include <iostream> using namespace std; void input ( int a[ ] ) { for ( int …… 题解列表 2022年10月10日 0 点赞 0 评论 327 浏览 评分:0.0
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)=…… 题解列表 2022年10月10日 0 点赞 0 评论 421 浏览 评分:0.0
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 评论 390 浏览 评分:0.0
1147-角谷猜想(代码简洁,思路清晰) 摘要:解题思路:注意事项:0是自然数、偶数、整数,不是正整数,所以不考虑0 参考代码:#include<iostream>using namespace std;int main(){ int n,…… 题解列表 2022年10月10日 0 点赞 0 评论 509 浏览 评分:0.0
温 度 转 换 摘要: #include #include using namespace std; int main() { float f,c; c…… 题解列表 2022年10月10日 0 点赞 0 评论 554 浏览 评分:0.0
分段函数求值 摘要: #include using namespace std; int main() { int x, y; cin >> x; …… 题解列表 2022年10月10日 0 点赞 0 评论 416 浏览 评分:0.0
1149-计算1~N之间所有奇数之和(代码简洁,思路清晰) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n,res=0; cin >>n; f…… 题解列表 2022年10月10日 0 点赞 0 评论 474 浏览 评分:0.0
成 绩 评 定 摘要: #include using namespace std; int main() { int n; cin >> n; if …… 题解列表 2022年10月10日 0 点赞 0 评论 430 浏览 评分:0.0
1150-计算t=1+1/2+1/3+...+1/n(代码简洁,思路清晰) 摘要:解题思路:注意事项:除法运算结果要是浮点数,那么被除数和除数至少有一个是浮点数 参考代码:#include<iostream>using namespace std;int main(){ …… 题解列表 2022年10月10日 0 点赞 0 评论 462 浏览 评分:0.0
利 润 计 算 摘要: #include using namespace std; int main() { int x, sum; cin >> x; …… 题解列表 2022年10月10日 0 点赞 0 评论 446 浏览 评分:0.0