Skip to main content
edited body
Source Link
sporkl
  • 6.9k
  • 1
  • 27
  • 63

Given a positive integer < 100 (from 01 to 99, including 01 and 99), output that many lockers.

Given a positive integer < 100 (from 0 to 99, including 0 and 99), output that many lockers.

Given a positive integer < 100 (from 1 to 99, including 1 and 99), output that many lockers.

Tweeted twitter.com/StackCodeGolf/status/857624820363792384
added 30 characters in body
Source Link
sporkl
  • 6.9k
  • 1
  • 27
  • 63
Input
Output
---------------------
1






+----+
|    |
|    |
|    |
| 01 |
+----+
--------------------- (newlines optional in case 1)
4
+----+----+
|    |    |
|    |    |
|    |    |
| 01 | 03 |
+----+----+
|    |    |
|    |    |
|    |    |
| 02 | 04 |
+----+----+
---------------------
5
+----+----+
|    |    |
|    |    |
|    |    |
| 01 | 03 |
+----+----+----+
|    |    |    |
|    |    |    |
|    |    |    |
| 02 | 04 | 05 |
+----+----+----+
---------------------
16
+----+----+----+----+----+----+----+----+
|    |    |    |    |    |    |    |    |
|    |    |    |    |    |    |    |    |
|    |    |    |    |    |    |    |    |
| 01 | 03 | 05 | 07 | 09 | 11 | 13 | 15 |
+----+----+----+----+----+----+----+----+
|    |    |    |    |    |    |    |    |
|    |    |    |    |    |    |    |    |
|    |    |    |    |    |    |    |    |
| 02 | 04 | 06 | 08 | 10 | 12 | 14 | 16 |
+----+----+----+----+----+----+----+----+
Input
Output
---------------------
1






+----+
|    |
|    |
|    |
| 01 |
+----+
---------------------
4
+----+----+
|    |    |
|    |    |
|    |    |
| 01 | 03 |
+----+----+
|    |    |
|    |    |
|    |    |
| 02 | 04 |
+----+----+
---------------------
5
+----+----+
|    |    |
|    |    |
|    |    |
| 01 | 03 |
+----+----+----+
|    |    |    |
|    |    |    |
|    |    |    |
| 02 | 04 | 05 |
+----+----+----+
---------------------
16
+----+----+----+----+----+----+----+----+
|    |    |    |    |    |    |    |    |
|    |    |    |    |    |    |    |    |
|    |    |    |    |    |    |    |    |
| 01 | 03 | 05 | 07 | 09 | 11 | 13 | 15 |
+----+----+----+----+----+----+----+----+
|    |    |    |    |    |    |    |    |
|    |    |    |    |    |    |    |    |
|    |    |    |    |    |    |    |    |
| 02 | 04 | 06 | 08 | 10 | 12 | 14 | 16 |
+----+----+----+----+----+----+----+----+
Input
Output
---------------------
1






+----+
|    |
|    |
|    |
| 01 |
+----+
--------------------- (newlines optional in case 1)
4
+----+----+
|    |    |
|    |    |
|    |    |
| 01 | 03 |
+----+----+
|    |    |
|    |    |
|    |    |
| 02 | 04 |
+----+----+
---------------------
5
+----+----+
|    |    |
|    |    |
|    |    |
| 01 | 03 |
+----+----+----+
|    |    |    |
|    |    |    |
|    |    |    |
| 02 | 04 | 05 |
+----+----+----+
---------------------
16
+----+----+----+----+----+----+----+----+
|    |    |    |    |    |    |    |    |
|    |    |    |    |    |    |    |    |
|    |    |    |    |    |    |    |    |
| 01 | 03 | 05 | 07 | 09 | 11 | 13 | 15 |
+----+----+----+----+----+----+----+----+
|    |    |    |    |    |    |    |    |
|    |    |    |    |    |    |    |    |
|    |    |    |    |    |    |    |    |
| 02 | 04 | 06 | 08 | 10 | 12 | 14 | 16 |
+----+----+----+----+----+----+----+----+
deleted 48 characters in body
Source Link
mbomb007
  • 23.5k
  • 7
  • 63
  • 135
Source Link
sporkl
  • 6.9k
  • 1
  • 27
  • 63
Loading