6 kyu

ASCII Fun #5: Days in Prison

Description:

Days in Prison

Given an integer n (0<=n<=500), return a string to visualize the days in prison in the following format:


                          |                                        ||||                                |||/
                          |                                        ||||                                ||/|
  daysInPrison(1) =>      |                  daysInPrison(4) =>    ||||        daysInPrison(5) =>      |/||
                          |                                        ||||                                /|||
                          
                          
                          |||/  |||/  |||/  |||/  |||/  |
                          ||/|  ||/|  ||/|  ||/|  ||/|  |
  daysInPrison(26) =>     |/||  |/||  |/||  |/||  |/||  |
                          /|||  /|||  /|||  /|||  /|||  |
                          
                          

                          |||/  |||/  |||/  |||/  |||/  |||/  |||/  |||/  |||/  |||/
                          ||/|  ||/|  ||/|  ||/|  ||/|  ||/|  ||/|  ||/|  ||/|  ||/|
                          |/||  |/||  |/||  |/||  |/||  |/||  |/||  |/||  |/||  |/||
                          /|||  /|||  /|||  /|||  /|||  /|||  /|||  /|||  /|||  /|||
  daysInPrison(56) =>                          
                          |||/  |
                          ||/|  |
                          |/||  |
                          /|||  |
                  

I hope you got the idea.

Rules & Notes

  • The first four strokes consists of 4 vertical |
  • The fifth strokes crosses the first vertical ones from the right upper corner to the left bottom corner with /
  • The 5's are splitted by a tab in each row. You can use \t to split them
  • Every Row can contain a maximum of 50 strokes
  • Every Row is splitted by an empty line (double newline) => \n\n
  • The maximum integer which will be tested is 500, so there will be a maximum of 10 rows
  • Return "" when n is 0

You can use the preloaded print function to output a pretty version of your solution =]

ASCII Art
Fundamentals

Stats:

CreatedNov 14, 2017
PublishedNov 16, 2017
Warriors Trained153
Total Skips1
Total Code Submissions477
Total Times Completed54
JavaScript Completions54
Total Stars10
% of votes with a positive feedback rating98% of 23
Total "Very Satisfied" Votes22
Total "Somewhat Satisfied" Votes1
Total "Not Satisfied" Votes0
Total Rank Assessments3
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • zruF Avatar
  • smile67 Avatar
Ad