Problem D: 打印栅栏

Problem D: 打印栅栏

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

给定两个整数 lns="http://www.w3.org/1998/Math/MathML">n 与 lns="http://www.w3.org/1998/Math/MathML">k,打印出一个栅栏图形,这个栅栏应该分成 lns="http://www.w3.org/1998/Math/MathML">n 段,段与段之间的间隔为 +, 段内的填充为 lns="http://www.w3.org/1998/Math/MathML">k 个 -

形如 lns="http://www.w3.org/1998/Math/MathML">n=5lns="http://www.w3.org/1998/Math/MathML">k=6 时,图形如下:

+------+------+------+------+------+

Input

两个整数表示 lns="http://www.w3.org/1998/Math/MathML">n 与 lns="http://www.w3.org/1998/Math/MathML">k
lns="http://www.w3.org/1998/Math/MathML">1k15

Output

表示符合要求的栅栏图案。

Sample Input Copy

4 5

Sample Output Copy

+-----+-----+-----+-----+