Logo
(追記) (追記ここまで)

34917번 - M 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB13812010087.719%

문제

Busy Beaver is throwing an MITIT party!

Busy Beaver is planning to print a large banner. His printer is old-school: it draws on an $N \times N$ pixel board, where $N$ is odd, using # for ink and . for blank space. For the first letter of the banner, he needs the letter M, printed as shown below.

Your job is to tell the printer exactly which pixels to ink.

Formally, the M is defined as follows. The left and right edges of the banner are the M's vertical legs, running all the way from top to bottom. From the top corners, two strokes with slope 1ドル$ and $-1$ descend inward, one from each side, meeting exactly in the middle row. Because $n$ is odd, there is a single center column and a single middle row where the slanted strokes touch. Below that meeting point, only the two outer legs continue to the bottom.

입력

The first line contains a single integer $T$ (1ドル \leq T \leq 50$) --- the number of test cases.

The only line of each test case contains a single odd integer $N$ (5ドル \leq N < 50,ドル $N$ is odd) --- the side length of Busy Beaver's board.

출력

For each test case, output $N$ lines, each containing $N$ characters # and . without spaces --- the letter M, as described in the statement.

Do not output empty lines between test cases.

제한

예제 입력 1

3
5
7
9

예제 출력 1

#...#
##.##
#.#.#
#...#
#...#
#.....#
##...##
#.#.#.#
#..#..#
#.....#
#.....#
#.....#
#.......#
##.....##
#.#...#.#
#..#.#..#
#...#...#
#.......#
#.......#
#.......#
#.......#

노트

출처

University > MIT > M(IT)^2 > M(IT)^2 Winter 2025-26 Tournament > Beginner Round 1번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /