Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
8
Task/Nth/Sidef/nth.sidef
Normal file
8
Task/Nth/Sidef/nth.sidef
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
func nth(n) {
|
||||
static irregulars = Hash(<1 ˢᵗ 2 ⁿᵈ 3 ʳᵈ 11 ᵗʰ 12 ᵗʰ 13 ᵗʰ>...)
|
||||
n.to_s + (irregulars{n % 100} \\ irregulars{n % 10} \\ 'ᵗʰ')
|
||||
}
|
||||
|
||||
for r in [0..25, 250..265, 1000..1025] {
|
||||
say r.map {|n| nth(n) }.join(" ")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue