#CCBCHBA0000092. Hình chữ nhật đường viền (Rectangle Outline)
Hình chữ nhật đường viền (Rectangle Outline)
Rectangle Outline
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given a rectangle of rows and columns, each at least 2, print * at any cell in its first/last row or column, and . at other cells. Do not separate characters with spaces.
Input
One line contains the integers (rows) and (columns).
Output
Print rows of exactly characters.
Subtasks
-
Subtask 1 (20%): .
-
Subtask 2 (30%): .
-
Subtask 3 (50%): .
Examples
Example 1
Input:
3 5
Output:
*****
*...*
*****
Explanation:
A cell is a star if it lies on any of the four border sides. For this sample, the input is 3 5; the displayed rows follow these rules exactly.
Example 2
Input:
2 3
Output:
***
***
Explanation:
A cell is a star if it lies on any of the four border sides. For this sample, the input is 2 3; the displayed rows follow these rules exactly.