旺仔烧麦
旺仔烧麦
全部文章
分类
归档
标签
去牛客网
登录
/
注册
旺仔烧麦的博客
TA的专栏
46篇文章
0人订阅
C/C++题解
46篇文章
60人学习
全部文章
(共69篇)
题解 | 获取数组最值
来自专栏
#include <iostream> using namespace std; int main() { int arr[6] = { 0 }; int len = sizeof(arr) / sizeof(int); int max = 0; in...
2026-01-07
0
35
题解 | 计算小球走过的路程和反弹高度
来自专栏
#include <iostream> #include <iomanip> using namespace std; int main() { // 下落的高度和落地的次数 double h; int n; double sum = h;...
2026-01-06
0
37
题解 | 规律数列求和
来自专栏
#include <iostream> using namespace std; long long power(long long base, int exp){ long long result = 1; for(int i=0; i<exp; i++){ ...
2026-01-06
0
34
题解 | 求 1 - n 之间偶数的和
来自专栏
#include <iostream> using namespace std; int main() { int n; cin >> n; int sum = 0; for(int i=1; i<=n; i++){ ...
2026-01-06
0
29
题解 | 判断成绩等级
来自专栏
#include <iostream> using namespace std; int main() { int score; cin >> score; if(score<0 || score>100){ c...
2026-01-06
0
37
题解 | 判断成绩等级
来自专栏
碰到可以取余的题目可以使用switch语句
2026-01-06
0
30
题解 | 计算商品打折结算金额
来自专栏
#include <iostream> #include <iomanip> using namespace std; int main() { double price; cin >> price; double cost ...
2026-01-06
0
32
题解 | 获取三个数中的最大值(三元表达式实现)
来自专栏
#include <iostream> using namespace std; int main() { int a, b, c; while(cin>>a>>b>>c){ int longer = (a&...
2026-01-06
0
46
题解 | 简单运算
来自专栏
#include <iostream> using namespace std; int main() { // write your code here...... int a, b; while(cin>>a>>b &&am...
2026-01-06
0
33
题解 | 获取两数中的较大值
来自专栏
#include <iostream> using namespace std; int main() { // write your code here...... int a, b; while(cin>>a>>b){ ...
2026-01-06
0
41
首页
上一页
1
2
3
4
5
6
7
下一页
末页