提交时间:2024-10-27 10:00:47
运行 ID: 54311
#include<bits/stdc++.h> using namespace std; int main(){ int a, b, d; char c; cin >> a >> b >> c >> d; if(d == 1){ for(int i = a; i > 0; i--){ for(int j = b; j > 0; j--){ cout << c; } cout << endl; } }else{ for(int i = b; i > 0; i--){ cout << c; } cout << endl; for(int i = a - 2; i > 0; i--){ cout << c; for(int j = b - 2; j > 0; j--){ cout << " "; } cout << c <<endl; } for(int j = b; j > 0; j--){ cout << c; } } return 0; }