Skip to content

Commit f92bc83

Browse files
committed
Add "Number Spiral" hole
1 parent efe49ad commit f92bc83

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

config/holes.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,6 +1334,28 @@ preamble = '''
13341334
their own line.
13351335
'''
13361336

1337+
['Number Spiral']
1338+
category = 'Art'
1339+
preamble = '''
1340+
<p>
1341+
Print a <b>10x10</b> grid of the numbers <b>0</b> to <b>99</b> inclusive.
1342+
Starting at the top left the numbers should spiral clockwise towards the
1343+
centre, be right aligned, and have a space between each number.
1344+
1345+
<p>The full grid should look like this:
1346+
1347+
<pre> 0 1 2 3 4 5 6 7 8 9
1348+
35 36 37 38 39 40 41 42 43 10
1349+
34 63 64 65 66 67 68 69 44 11
1350+
33 62 83 84 85 86 87 70 45 12
1351+
32 61 82 95 96 97 88 71 46 13
1352+
31 60 81 94 99 98 89 72 47 14
1353+
30 59 80 93 92 91 90 73 48 15
1354+
29 58 79 78 77 76 75 74 49 16
1355+
28 57 56 55 54 53 52 51 50 17
1356+
27 26 25 24 23 22 21 20 19 18</pre>
1357+
'''
1358+
13371359
['Odd Polyomino Tiling']
13381360
category = 'Art'
13391361
experiment = -1

db/a-schema.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ CREATE TYPE hole AS ENUM (
2626
'intersection', 'isbn', 'kolakoski-constant', 'kolakoski-sequence',
2727
'leap-years', 'levenshtein-distance', 'leyland-numbers', 'look-and-say',
2828
'lucky-tickets', 'morse-decoder', 'morse-encoder', 'musical-chords',
29-
'niven-numbers', 'odious-numbers', 'ordinal-numbers', 'pangram-grep',
30-
'pascals-triangle', 'pernicious-numbers', 'poker', 'prime-numbers',
31-
'prime-numbers-long', 'qr-decoder', 'quine', 'recamán',
29+
'niven-numbers', 'number-spiral', 'odious-numbers', 'ordinal-numbers',
30+
'pangram-grep', 'pascals-triangle', 'pernicious-numbers', 'poker',
31+
'prime-numbers', 'prime-numbers-long', 'qr-decoder', 'quine', 'recamán',
3232
'rock-paper-scissors-spock-lizard', 'roman-to-arabic', 'rule-110',
3333
'seven-segment', 'sierpiński-triangle', 'smith-numbers',
3434
'spelling-numbers', 'star-wars-opening-crawl', 'sudoku', 'sudoku-v2',

hole/answers/number-spiral.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
0 1 2 3 4 5 6 7 8 9
2+
35 36 37 38 39 40 41 42 43 10
3+
34 63 64 65 66 67 68 69 44 11
4+
33 62 83 84 85 86 87 70 45 12
5+
32 61 82 95 96 97 88 71 46 13
6+
31 60 81 94 99 98 89 72 47 14
7+
30 59 80 93 92 91 90 73 48 15
8+
29 58 79 78 77 76 75 74 49 16
9+
28 57 56 55 54 53 52 51 50 17
10+
27 26 25 24 23 22 21 20 19 18

0 commit comments

Comments
 (0)