Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: ChanakanStudy
Problemset: อโมกุส
Language: cpp
Time: 0.004 second
Submitted On: 2026-09-19 21:51:19
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
for(int row=1;row<n*4+1;row++) {
for(int column=1;column<n*4+1;column++) {
if(row <= n) {
if (column<=n) {
cout << " ";
}
else {
cout << "#";
}
}
else if (row >= n*4-(n-1)) {
if (column <= n*4 && column > n*4-n) {
cout << "#";
}
else if (column <= n*2 && column > n*2-n) {
cout << "#";
}
else {
cout << " ";
}
}
else if (row <= n*4-n && row > n*2) {
cout << "#";
}
else {
if(column > n*2) {
cout << " ";
}
else {
cout << "#";
}
}
}
cout << endl;
}
}