会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
wangyanbo111
博客园
首页
新随笔
联系
管理
订阅
2025年8月7日
倒序输出
摘要: #include <bits/stdc++.h> using namespace std; int main() { int a,b,c,d,e; cin>>a; b=a%1000%100%10*1000; c=a%1000/100*10; d=a/1000; e=a%1000%100/10*100
阅读全文
posted @ 2025-08-07 15:54 黛玉醉打将门神
阅读(4)
评论(0)
推荐(0)
2025年8月2日
noi 亲密数对
摘要: #include <bits/stdc++.h> using namespace std; void y(int a,int b,int c){ for(int k=3;k<=a;k++){ b=0,c=0; for(int m=2;m<=k/2;m++){ if(k%m==0){ b+=m; }
阅读全文
posted @ 2025-08-02 15:48 黛玉醉打将门神
阅读(5)
评论(0)
推荐(0)
递归(三角形实例代码)
摘要: #include <bits/stdc++.h> using namespace std; void y(int k,int l){ if(k>0){ cout<<l; l++; k--; y(k,l); } } int main(int argc, char** argv) { int a; ci
阅读全文
posted @ 2025-08-02 15:16 黛玉醉打将门神
阅读(2)
评论(0)
推荐(0)
斐波那契数列
摘要: #include <bits/stdc++.h> using namespace std; int y(int l,int a,int b){ if(l>0){ l--; cout<<a<<" "; y(l,b,a+b); } } int main(int argc, char** argv) {
阅读全文
posted @ 2025-08-02 14:52 黛玉醉打将门神
阅读(6)
评论(0)
推荐(0)
阶乘(递归实例代码)
摘要: #include <bits/stdc++.h> using namespace std; int y(int k){ if(k==0){ return 1; } return k*y(k-1); } int main(int argc, char** argv) { int a=5; cout<<
阅读全文
posted @ 2025-08-02 14:35 黛玉醉打将门神
阅读(4)
评论(0)
推荐(0)
2025年7月29日
求m,n的最大公因数(递归)
摘要: #include<bits/stdc++.h> using namespace std; int zc(int x,int y){ if(x%y==0){ return y; }else{ return zc(y,x%y); } } int main() { int x,y; cin>>x>>y;
阅读全文
posted @ 2025-07-29 15:51 黛玉醉打将门神
阅读(5)
评论(0)
推荐(0)
2025年7月26日
学生
摘要: #include <bits/stdc++.h> using namespace std; struct Tom{ string name; int age; int score; }; bool score_1(const Tom &a,const Tom &b){ if(a.score==b.s
阅读全文
posted @ 2025-07-26 15:46 黛玉醉打将门神
阅读(4)
评论(0)
推荐(0)
字母长度排列
摘要: #include <bits/stdc++.h> using namespace std; bool len(string &a,string &b){ return a.length()<b.length(); } int main(int argc, char** argv) { vector<
阅读全文
posted @ 2025-07-26 15:23 黛玉醉打将门神
阅读(4)
评论(0)
推荐(0)
sort升序降序排列
摘要: 1 #include <bits/stdc++.h> 2 using namespace std; 3 void basicSort(){ 4 vector<int> nums{3,5,2,1,6,9,7}; 5 sort(nums.begin(),nums.end()); 6 cout<<"升序"
阅读全文
posted @ 2025-07-26 14:59 黛玉醉打将门神
阅读(5)
评论(0)
推荐(0)
2025年7月17日
中缀表达式转后缀表达式
摘要: //"6 9 + 5 3 * - 8 -" #include <bits/stdc++.h> using namespace std; int n,i = 0,a[100]; char a1; int main(){ cin>>n; while(n--){ cin>>a1; if(a1>='1' &
阅读全文
posted @ 2025-07-17 15:50 黛玉醉打将门神
阅读(5)
评论(0)
推荐(0)
下一页
公告