Skip to content

Commit

Permalink
Add "Prime Numbers (Long)"
Browse files Browse the repository at this point in the history
Looks like 10k "won", closes #548

Updates #384
  • Loading branch information
JRaspass committed Dec 5, 2021
1 parent 12682a3 commit 56ae94b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 14,737 deletions.
4 changes: 0 additions & 4 deletions config/holes.go
Expand Up @@ -74,10 +74,6 @@ func init() {
hole.ID = id(name)
hole.Name = name

if strings.HasPrefix(name, "Prime Numbers (") {
hole.Experiment = 548
}

// Minify preamble.
if html, err := minify.HTML(string(hole.Preamble)); err != nil {
panic(err)
Expand Down
7 changes: 4 additions & 3 deletions config/holes.toml
Expand Up @@ -1459,15 +1459,16 @@ preamble = '''

['Prime Numbers']
category = 'Sequence'
variants = ['Prime Numbers', 'Prime Numbers (10k)', 'Prime Numbers (50k)', 'Prime Numbers (100k)']
variants = ['Prime Numbers', 'Prime Numbers (Long)']
links = [
{ name = 'OEIS A000040', url = '//oeis.org/A000040' },
{ name = 'Wikipedia', url = '//www.wikipedia.org/wiki/Prime_number' },
]
preamble = '''
<p>
Print all the prime numbers from <b>1</b> to <b>100</b> inclusive, each on
their own line.
Print all the prime numbers from <b>1</b> to
<b>{{ if eq . "Prime Numbers" }}100{{ else }}10,000{{ end }}</b>
inclusive, each on their own line.
'''

['QR Decoder']
Expand Down
11 changes: 6 additions & 5 deletions db/a-schema.sql
Expand Up @@ -28,11 +28,12 @@ CREATE TYPE hole AS ENUM (
'lucky-tickets', 'morse-decoder', 'morse-encoder', 'musical-chords',
'niven-numbers', 'odious-numbers', 'ordinal-numbers', 'pangram-grep',
'pascals-triangle', 'pernicious-numbers', 'poker', 'prime-numbers',
'qr-decoder', 'quine', 'recamán', 'rock-paper-scissors-spock-lizard',
'roman-to-arabic', 'rule-110', 'seven-segment', 'sierpiński-triangle',
'smith-numbers', 'spelling-numbers', 'star-wars-opening-crawl', 'sudoku',
'sudoku-v2', 'ten-pin-bowling', 'tongue-twisters', 'united-states',
'vampire-numbers', 'van-eck-sequence', 'λ', 'π', 'τ', 'φ', '√2', '𝑒'
'prime-numbers-long', 'qr-decoder', 'quine', 'recamán',
'rock-paper-scissors-spock-lizard', 'roman-to-arabic', 'rule-110',
'seven-segment', 'sierpiński-triangle', 'smith-numbers',
'spelling-numbers', 'star-wars-opening-crawl', 'sudoku', 'sudoku-v2',
'ten-pin-bowling', 'tongue-twisters', 'united-states', 'vampire-numbers',
'van-eck-sequence', 'λ', 'π', 'τ', 'φ', '√2', '𝑒'
);

CREATE TYPE keymap AS ENUM ('default', 'vim');
Expand Down

0 comments on commit 56ae94b

Please sign in to comment.