Skip to content

Baekjoon 5354

1. Problem

문제 확인하기

2. Solution

for _ in range(int(input())):
    n = int(input())
    if n < 3:
        for i in range(n):
            print('#'*n)
        print()
    else:
        print('#'*n)
        for i in range(n-2):
            print('#' + 'J'*(n-2) + '#')
        print('#'*n, '\n')