题解
2025-05-19 20:26:04
发布于:北京
29阅读
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;
}
这里空空如也
有帮助,赞一个