Submission

Status:
PPPPPPPPPP

Score: 100

User: njoop

Problemset: อโมกุส

Language: cpp

Time: 0.003 second

Submitted On: 2024-11-28 22:25:38

#include <bits/stdc++.h>

using namespace std;

char arr[1000][1000];

int main() {
    int n;
    cin >> n;
    for(int i=1; i<=1000; i++) {
        for(int j=1; j<=1000; j++) {
            arr[i][j] = ' ';
        }
    }
    for(int i=1; i<=n; i++) {
        for(int j=n+1; j<=4*n; j++) {
            arr[i][j] = '#';
        }
    }
    for(int i=n+1; i<=2*n; i++) {
        for(int j=1; j<=2*n; j++) {
            arr[i][j] = '#';
        }
    }
    for(int i=2*n+1; i<=3*n; i++) {
        for(int j=1; j<=4*n; j++) {
            arr[i][j] = '#';
        }
    }
    for(int i=3*n+1; i<=4*n; i++) {
        for(int j=n+1; j<=2*n; j++) {
            arr[i][j] = '#';
        }
        for(int j=3*n+1; j<=4*n; j++) {
            arr[i][j] = '#';
        }
    }
    for(int i=1; i<=4*n; i++) {
        for(int j=1; j<=4*n; j++) {
            cout << arr[i][j];
        }
        cout << "\n";
    }
    return 0;
}