Back
Close

The window

Statement

 Goal

You have to draw a beautiful window.
Every side of the window panes is N characters.
Input
line 1 : the Integer N.
Output
A beautiful window.
Constraints
1 <= N <= 13
Example
Input
3
Output
---------
|...|...|
|...|...|
|...|...|
|---+---|
|...|...|
|...|...|
|...|...|
---------

Game modes
Shortest, Reverse

Test cases
Example Test
Input
3
Output
--------- |...|...| |...|...| |...|...| |---+---| |...|...| |...|...| |...|...| ---------

Example validator Validator
Input
3
Output
--------- |...|...| |...|...| |...|...| |---+---| |...|...| |...|...| |...|...| ---------

Little window Test
Input
1
Output
----- |.|.| |-+-| |.|.| -----

Little window validator Validator
Input
1
Output
----- |.|.| |-+-| |.|.| -----

Big window Test
Input
7
Output
----------------- |.......|.......| |.......|.......| |.......|.......| |.......|.......| |.......|.......| |.......|.......| |.......|.......| |-------+-------| |.......|.......| |.......|.......| |.......|.......| |.......|.......| |.......|.......| |.......|.......| |.......|.......| -----------------

Big window validator Validator
Input
7
Output
----------------- |.......|.......| |.......|.......| |.......|.......| |.......|.......| |.......|.......| |.......|.......| |.......|.......| |-------+-------| |.......|.......| |.......|.......| |.......|.......| |.......|.......| |.......|.......| |.......|.......| |.......|.......| -----------------

Giant window Test
Input
10
Output
----------------------- |..........|..........| |..........|..........| |..........|..........| |..........|..........| |..........|..........| |..........|..........| |..........|..........| |..........|..........| |..........|..........| |..........|..........| |----------+----------| |..........|..........| |..........|..........| |..........|..........| |..........|..........| |..........|..........| |..........|..........| |..........|..........| |..........|..........| |..........|..........| |..........|..........| -----------------------

Giant window validator Validator
Input
13
Output
----------------------------- |.............|.............| |.............|.............| |.............|.............| |.............|.............| |.............|.............| |.............|.............| |.............|.............| |.............|.............| |.............|.............| |.............|.............| |.............|.............| |.............|.............| |.............|.............| |-------------+-------------| |.............|.............| |.............|.............| |.............|.............| |.............|.............| |.............|.............| |.............|.............| |.............|.............| |.............|.............| |.............|.............| |.............|.............| |.............|.............| |.............|.............| |.............|.............| -----------------------------

Solution language

Solution

Stub generator input