题解
2025-05-19 20:26:04
发布于:北京
76阅读
0回复
0点赞
按照题意模拟即可,注意 while 循环条件不要写错。
Code:
#include<bits/stdc++.h>
using namespace std;
int n,m;
int main(){
cin>>n>>m;
while(n||m){
if(n){
n--;
cout<<'#';
}
if(m){
m--;
cout<<'*';
}
}
return 0;
}
全部评论 1
#include<bits/stdc++.h> using namespace std; int main(} {2026-04-17 来自 安徽
0bushi
2026-04-17 来自 安徽
0fa cuo le
2026-04-17 来自 安徽
0







有帮助,赞一个