提交时间:2023-11-06 20:51:26

运行 ID: 30335

#include <bits/stdc++.h> using namespace std; int main(){ int n, m, x; cin >> n >> m; char y; cin >> y; cin >> x; for (int i = 0; i < n; i++){ for(int j = 0; j < m; j++){ if(x == 0){ if(i != 0 && i != n - 1 && j != 0 && j != n - 1 ){ cout << " "; }else{ cout << y; } }else{ if(i != 0 && i != n - 1 && j != 0 && j != n - 1 ){ cout << y; }else{ cout << y; } } } cout << endl; } return 0; }