#CCBCHBA0000088. Khung rỗng (Hollow Frame)
Khung rỗng (Hollow Frame)
Hollow Frame
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given , print a grid of rows and columns. A cell on the first or last row or first or last column is #; any other cell is .. Indices start at 1. If or , every cell is on the border. Do not print spaces between characters.
Input
One line contains integers (rows) and (columns).
Output
Print exactly lines of characters.
Subtasks
-
Subtask 1 (20%): .
-
Subtask 2 (30%): .
-
Subtask 3 (50%): .
Examples
Example 1
Input:
3 4
Output:
####
#..#
####
Explanation:
The first and last rows are entirely on the border; interior rows have # at each end. A one-row grid is all border. For this sample, the input is 3 4; the displayed rows follow these rules exactly.
Example 2
Input:
1 3
Output:
###
Explanation:
The first and last rows are entirely on the border; interior rows have # at each end. A one-row grid is all border. For this sample, the input is 1 3; the displayed rows follow these rules exactly.