Submission
Status:
PPPPPPPPPP
Score: 100
User: Cmoss9
Problemset: อโมกุส
Language: cpp
Time: 0.002 second
Submitted On: 2024-11-13 19:45:12
#include <bits/stdc++.h>
using namespace std;
int main () {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
int maxrow = n*4;
int sec1 = 3*n,sec2 = 2*n,sec3 = 4*n;
for (int row = 1;row<=maxrow;row++) {
if (row <= n) {
for (int i = 0;i<n;i++) {
cout << " ";
}
for (int i = 0;i<sec1;i++) {
cout << "#";
}
cout << endl;
}
if (row > n && row <= 2*n) {
for (int i = 0;i<sec2;i++) {
cout << "#";
}
for (int i = 0;i<sec2;i++) {
cout << " ";
}
cout << endl;
}
if (row > 2*n && row <= 3*n) {
for (int i = 0;i<sec3;i++) {
cout << "#";
}
cout << endl;
}
if (row > 3*n && row <= 4*n) {
for (int i = 0;i<n;i++) {
cout << " ";
}
for (int i = 0;i<n;i++) {
cout << "#";
}
for (int i = 0;i<n;i++) {
cout << " ";
}
for (int i = 0;i<n;i++) {
cout << "#";
}
cout << endl;
}
}
}