Infamy of xxd
Statement
Make the text surrounded by a beautiful scroll.
For example given some text like "xxd is cool", surround it with a scroll like so
``` _______________
/ _\ \
\_/__\ \
|Xxd is cool|
| ________|___
\ /__\ \
\___/_________/```
The minimum width of the paper is 4 characters
Input description
<<Line 1:>> An integer [[N]] for the number of lines of text
<<Next [[N]] lines:>> The text
Output description
The text surrounded by a scroll
Constraints
0 ≤ [[N]] ≤ 10
0 ≤ paper width ≤ 80
Game modes
Test cases
He who creates Test
Input
1
Xxd is cool
Output
_______________
/ _\ \
\_/__\ \
|Xxd is cool|
| ________|___
\ /__\ \
\___/_________/
He who creates Validator
Input
1
Validators test things
Output
__________________________
/ _\ \
\_/__\ \
|Validators test things|
| ___________________|___
\ /__\ \
\___/____________________/
Two Lines Test
Input
2
once upon a time
in a galaxy far far away
Output
____________________________
/ _\ \
\_/__\ \
|once upon a time |
|in a galaxy far far away|
| _____________________|___
\ /__\ \
\___/______________________/
Two Lines Validator
Input
2
there was an old woman
who lived in a shoe
Output
__________________________
/ _\ \
\_/__\ \
|there was an old woman|
|who lived in a shoe |
| ___________________|___
\ /__\ \
\___/____________________/
Many Lines Test
Input
4
one fish
two fish
red fish
blue fish
Output
_____________
/ _\ \
\_/__\ \
|one fish |
|two fish |
|red fish |
|blue fish|
| ______|___
\ /__\ \
\___/_______/
Many Lines Validator
Input
3
one fish
blue fish
two fish
Output
_____________
/ _\ \
\_/__\ \
|one fish |
|blue fish|
|two fish |
| ______|___
\ /__\ \
\___/_______/
Zero Test
Input
0
Output
________
/ _\ \
\_/__\ \
| _|___
\ /__\ \
\___/__/
Zero Validator
Input
0
Output
________
/ _\ \
\_/__\ \
| _|___
\ /__\ \
\___/__/
Minimum Width Test
Input
1
a
Output
________
/ _\ \
\_/__\ \
|a |
| _|___
\ /__\ \
\___/__/
Minimum Width Validator
Input
2
b
c
Output
________
/ _\ \
\_/__\ \
|b |
|c |
| _|___
\ /__\ \
\___/__/
Solution language
Solution
Stub generator input