R (with english
package), 16 bytes / 16 bytes
### Part 1, 16 bytes
Part 1, 16 bytes
f=function(n)1:n
Part 2, 16 bytes
english::ordinal
Requires the english
package (which is not installed on TIO, unfortunately).
english::ordinal(f(22))
outputs first second third fourth fifth sixth seventh eighth ninth tenth eleventh twelfth thirteenth fourteenth fifteenth sixteenth seventeenth eighteenth nineteenth twentieth twenty first twenty second
.
Of course, part 1 could be made much shorter (3 bytes: seq
), but that would go against the constraint that part 2 has to be no longer than part 1.