#CCBCHBA0000116. Hình chữ nhật rỗng (Hollow Rectangle)
Hình chữ nhật rỗng (Hollow Rectangle)
Hollow Rectangle
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given height and width , print lines of characters. Border cells (first/last row or column) are *, and all other cells are .. If either dimension is 1, all cells are border cells.
Input
One line contains .
Output
Print the figure without spaces between characters.
Subtasks
-
Subtask 1 (20%): .
-
Subtask 2 (30%): .
-
Subtask 3 (50%): .
Examples
Example 1
Input:
3 4
Output:
****
*..*
****
Explanation:
The grid has 3 rows and 4 columns; border cells are * and interior cells are dots.
Example 2
Input:
1 3
Output:
***
Explanation:
The grid has 1 rows and 3 columns; border cells are * and interior cells are dots.