新手解题:1087丨使用do while循环 摘要:解题思路:注意事项:参考代码:#includeusing namespace std;int main(){ int a, b; cin >> a >> b; do{ …… 题解列表 2023年02月03日 0 点赞 0 评论 495 浏览 评分:9.9
鸡兔同笼问题 摘要:解题思路:数学方法解方程注意事项:参考代码:#include<stdio.h>int main(){ int n,x,y,m; scanf("%d%d",&x,&y); …… 题解列表 2023年02月03日 0 点赞 0 评论 710 浏览 评分:8.0
循环链表解决报数--简单解法 摘要:解题思路:// 若要循环链表删除数据直至一个时,则只需一个int pos记录位置// 定义俩个结构指针,一个指当前的,一个指前一个的 // 定义一个i,初始化为0,从head开始++i,每当i==3/…… 题解列表 2023年02月03日 0 点赞 0 评论 340 浏览 评分:9.9
1260: 逆反的01串 摘要:```cpp #include #include using namespace std; int main() { char n[200]; while(cin>>n)…… 题解列表 2023年02月03日 0 点赞 0 评论 397 浏览 评分:9.9
1261: 速算24点 摘要:```cpp #include #include using namespace std; int sign(int a,int b,int i) { switch(i) …… 题解列表 2023年02月03日 0 点赞 0 评论 565 浏览 评分:9.9
1262: 邮局选址问题 摘要:```cpp #include #include using namespace std; int main() { int a[10000],b[10000],n; c…… 题解列表 2023年02月03日 0 点赞 0 评论 426 浏览 评分:9.9
最大公约数与最小公倍数 摘要:解题思路:利用辗转相除法求最大公因数int a,b,c,d,e,f,g; scanf("%d %d",&a,&b); d=a; e=b; while(b!=0) { …… 题解列表 2023年02月03日 0 点赞 0 评论 255 浏览 评分:0.0
1263: 金明的预算方案 摘要:```cpp #include #include #define pb push_back using namespace std; int feesum,n,ans,f[32000],cn…… 题解列表 2023年02月03日 0 点赞 0 评论 390 浏览 评分:9.9
1264: 防御导弹 摘要:```cpp #include using namespace std; int main() { int a,num[20],cnt=0,dp[20],ans=-1; w…… 题解列表 2023年02月03日 0 点赞 0 评论 481 浏览 评分:9.9
<循环>求1~1000数字总和(C语言) 摘要:法一:for循环 #include<stdio.h> int main() { int sum = 0; for (int i = 1; i < 1001; i++) { su…… 题解列表 2023年02月03日 0 点赞 0 评论 435 浏览 评分:10.0