文章
19
粉丝
21
获赞
5
访问
19.0k
# include <bits/stdc++.h>
using namespace std;
int n;
int main (void){
cin >> n;
for (int i = 1; i <= n * 2 + 1; ++i){
for (int j = 1; j <= abs(n + 1 - i) + 1; ++j){
cout << "*" << " ";
}
cout << endl;
}
return 0;
}
# include <bits/stdc++.h>
using namespace std;
int main (void){
int n,k;
cin >> n >> k;
if (n < k * 3){
puts("-1");
}else{
string ans;
for (int i = 1; i <= k; ++i)
ans += "you";
k = n - 3 * k;
while (k --) ans += 'y';
cout << ans << endl;...
登录后发布评论
暂无评论,来抢沙发