题解 2907: 不与最大数相同的数字之和 #includeusingnamespacestd;inta[110];intmain(){intn,t=-1e9;cin>>n;for(inti=1;i>a[i];t=max(t,a[i]);}intsum=0;for(inti=0;i 题解列表 2023年12月05日 0 点赞 0 评论 472 浏览 评分:2.0
Yu:2816统计满足条件的4位数个数 摘要:#### 解题思路: 在会如何得到每一位数的情况下再思考此题。 如何得到每一位数的模板如下: ```c++ while(n){ // 当n变为0时循环结束 cout > …… 题解列表 2023年12月05日 0 点赞 0 评论 485 浏览 评分:0.0
菲波那契数列 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int f[100]={0,1};int main(){ int n; cin>>n…… 题解列表 2023年12月05日 0 点赞 0 评论 545 浏览 评分:7.0
2775: 等差数列末项计算 摘要:解题思路:注意事项:b比a大所以先写b,最后加a。参考代码:#include <iostream>using namespace std;int main(){ int a,b,n; ci…… 题解列表 2023年12月05日 0 点赞 0 评论 452 浏览 评分:9.9
2773: 计算线段长度 摘要:解题思路:注意事项:要按题目给的顺序写参考代码:#include<bits/stdc++.h>using namespace std;yaybint main(){ double xa, xb,…… 题解列表 2023年12月05日 0 点赞 0 评论 578 浏览 评分:9.9
Yu:2913整数去重 ###解析**注意:**题目数据范围10~100,这样我们可以用a[i]的值代表i的个数。如果为一,表示只出现过一次,这种状态下输出。0表示未出现过,1以上表示出现多次。把数组定义为全局变量,这样可以保证数组里每一个元素都是0。###参考代码```#includeusingnamespacestd;i 题解列表 2023年12月05日 0 点赞 0 评论 521 浏览 评分:9.9
编写题解 2809: 菲波那契数列 摘要:解题思路:注意事项:参考代码:#includeusing namespace std;int main(){ int k,b=1,c=1,s=0; cin>>k; for(int i…… 题解列表 2023年12月05日 0 点赞 0 评论 467 浏览 评分:0.0
题解 2764: 带余除法 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b; cin>>a>>b; cout<<a/b…… 题解列表 2023年12月05日 0 点赞 0 评论 660 浏览 评分:9.9
题解 2751: 超级玛丽游戏 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ cout<<" ********"<…… 题解列表 2023年12月05日 0 点赞 0 评论 446 浏览 评分:8.5
题解 2773: 计算线段长度 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double xa,ya,xb,yb; cin…… 题解列表 2023年12月05日 0 点赞 0 评论 401 浏览 评分:0.0