Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Sandbox

Post History

50%
+0 −0
Sandbox Awkward Ordinals [FINALIZED]

posted 7d ago by trichoplax‭  ·  edited 3d ago by trichoplax‭

#8: Post edited by user avatar trichoplax‭ · 2025-04-18T23:21:43Z (3 days ago)
Mark as finalized
  • Awkward Ordinals
  • Awkward Ordinals [FINALIZED]
  • Write code that takes a positive integer and outputs the awkward ordinal name from the test cases. Notice that these are **not** the [conventional ordinal names](https://en.wikipedia.org/wiki/Ordinal_numeral), although there is significant overlap.
  • You are free to use any approach that happens to pass all the test cases.
  • ## Input
  • - A positive integer from the test cases.
  • - You are not required to support any input not listed in the test cases.
  • ## Output
  • - The corresponding string from the test cases.
  • - This must be in the exact format shown, including having spaces in and only in the specified places.
  • ## Example
  • Given input `224`:
  • - The correct output is `twentytwenty fourth`.
  • - It is incorrect to output `twenty twenty fourth` (due to the extra space).
  • - It is incorrect to output `twentytwentyfourth` (due to the missing space).
  • ## Test cases
  • Test cases are in the format `input:output` where the input is a positive integer, and the output is made up solely of lower case letters and sometimes spaces.
  • There are 248 test cases, spread between 1, 2, 3, 4, and 5 digit inputs.
  • ```text
  • 1:first
  • 2:second
  • 3:third
  • 4:fourth
  • 5:fifth
  • 6:sixth
  • 7:seventh
  • 8:eighth
  • 9:ninth
  • 10:tenth
  • 11:eleventh
  • 12:twelfth
  • 13:thirteenth
  • 14:fourteenth
  • 15:fifteenth
  • 16:sixteenth
  • 17:seventeenth
  • 18:eighteenth
  • 19:nineteenth
  • 20:twentieth
  • 21:twenty first
  • 22:twenty second
  • 23:twenty third
  • 24:twenty fourth
  • 25:twenty fifth
  • 26:twenty sixth
  • 27:twenty seventh
  • 28:twenty eighth
  • 29:twenty ninth
  • 30:twenty tenth
  • 31:twenty eleventh
  • 32:twenty twelfth
  • 33:twenty thirteenth
  • 34:twenty fourteenth
  • 35:twenty fifteenth
  • 36:twenty sixteenth
  • 37:twenty seventeenth
  • 38:twenty eighteenth
  • 39:twenty nineteenth
  • 40:fortieth
  • 41:forty first
  • 44:forty fourth
  • 47:forty seventh
  • 50:forty tenth
  • 53:forty thirteenth
  • 56:forty sixteenth
  • 59:forty nineteenth
  • 62:sixty second
  • 65:sixty fifth
  • 68:sixty eighth
  • 71:sixty eleventh
  • 74:sixty fourteenth
  • 77:sixty seventeenth
  • 80:eightieth
  • 83:eighty third
  • 86:eighty sixth
  • 89:eighty ninth
  • 92:eighty twelfth
  • 95:eighty fifteenth
  • 98:eighty eighteenth
  • 105:tenty fifth
  • 112:tenty twelfth
  • 119:tenty nineteenth
  • 126:twelfty sixth
  • 133:twelfty thirteenth
  • 140:fourteentieth
  • 147:fourteenty seventh
  • 154:fourteenty fourteenth
  • 161:sixteenty first
  • 168:sixteenty eighth
  • 175:sixteenty fifteenth
  • 182:eighteenty second
  • 189:eighteenty ninth
  • 196:eighteenty sixteenth
  • 203:twentyty third
  • 210:twentyty tenth
  • 217:twentyty seventeenth
  • 224:twentytwenty fourth
  • 231:twentytwenty eleventh
  • 250:twentyforty tenth
  • 269:twentysixty ninth
  • 288:twentyeighty eighth
  • 307:twentytenty seventh
  • 326:twentytwelfty sixth
  • 345:twentyfourteenty fifth
  • 364:twentysixteenty fourth
  • 383:twentyeighteenty third
  • 402:fortyty second
  • 421:fortytwenty first
  • 440:fortyfortieth
  • 459:fortyforty nineteenth
  • 478:fortysixty eighteenth
  • 497:fortyeighty seventeenth
  • 516:fortytenty sixteenth
  • 535:fortytwelfty fifteenth
  • 554:fortyfourteenty fourteenth
  • 573:fortysixteenty thirteenth
  • 592:fortyeighteenty twelfth
  • 880:eightyeightieth
  • 1283:twelftyeighty third
  • 1400:fourteentytieth
  • 1617:sixteentyty seventeenth
  • 4360:fortytwentysixteentieth
  • 4895:fortyeightyeighty fifteenth
  • 6802:sixtyeightyty second
  • 6837:sixtyeightytwenty seventeenth
  • 7999:sixtyeighteentyeighteenty nineteenth
  • 8320:eightytwentytwelftieth
  • 8944:eightyeightyfourteenty fourth
  • 9274:eightytwelftysixty fourteenth
  • 9353:eightytwelftyfourteenty thirteenth
  • 10008:tentytyty eighth
  • 10045:tentytyforty fifth
  • 10405:tentyfortyty fifth
  • 10731:tentysixtytwelfty eleventh
  • 10740:tentysixtyfourteentieth
  • 11320:tentytwelftytwelftieth
  • 13206:twelftytwelftyty sixth
  • 13240:twelftytwelftyfortieth
  • 13415:twelftyfourteentyty fifteenth
  • 13471:twelftyfourteentysixty eleventh
  • 14616:fourteentysixtyty sixteenth
  • 15348:fourteentytwelftyfourteenty eighth
  • 15560:fourteentyfourteentysixteentieth
  • 16000:sixteentytytieth
  • 17333:sixteentytwelftytwelfty thirteenth
  • 18066:eighteentytysixty sixth
  • 18263:eighteentytwentysixty third
  • 18976:eighteentyeightysixteenty sixteenth
  • 20017:twentytytyty seventeenth
  • 20018:twentytytyty eighteenth
  • 20260:twentytytwentysixtieth
  • 20955:twentytyeightyfourteenty fifteenth
  • 21445:twentytyfourteentyforty fifth
  • 21553:twentytyfourteentyfourteenty thirteenth
  • 21860:twentytyeighteentysixtieth
  • 25188:twentyfortytentyeighteenty eighth
  • 25529:twentyfortyfourteentytwelfty ninth
  • 27360:twentysixtytwelftysixteentieth
  • 27772:twentysixtysixteentysixteenty twelfth
  • 28061:twentyeightytysixty first
  • 28800:twentyeightyeightytieth
  • 29220:twentyeightytwelftytwentieth
  • 29740:twentyeightysixteentyfourteentieth
  • 29950:twentyeightyeighteentyfourteenty tenth
  • 30340:twentytentytwentyfourteentieth
  • 31036:twentytentytentytwenty sixteenth
  • 31600:twentytentysixteentytieth
  • 33680:twentytwelftysixteentyeightieth
  • 33719:twentytwelftysixteentytenty nineteenth
  • 34019:twentyfourteentytyty nineteenth
  • 34341:twentyfourteentytwentyfourteenty first
  • 34526:twentyfourteentyfortytwelfty sixth
  • 34713:twentyfourteentysixtytenty thirteenth
  • 34715:twentyfourteentysixtytenty fifteenth
  • 36650:twentysixteentysixtyforty tenth
  • 37381:twentysixteentytwelftyeighteenty first
  • 37780:twentysixteentysixteentyeighteentieth
  • 38299:twentyeighteentytwentyeighty nineteenth
  • 38982:twentyeighteentyeightyeighteenty second
  • 40000:fortytytytieth
  • 40907:fortytyeightytenty seventh
  • 41849:fortytyeighteentyforty ninth
  • 42000:fortytwentytytieth
  • 42527:fortytwentyfortytwelfty seventh
  • 43356:fortytwentytwelftyfourteenty sixteenth
  • 43382:fortytwentytwelftyeighteenty second
  • 44003:fortyfortytyty third
  • 45187:fortyfortytentyeighteenty seventh
  • 45208:fortyfortytwelftyty eighth
  • 46220:fortysixtytwentytwentieth
  • 46827:fortysixtyeightytwenty seventh
  • 47436:fortysixtyfourteentytwenty sixteenth
  • 47744:fortysixtysixteentyfourteenty fourth
  • 47800:fortysixtyeighteentytieth
  • 48198:fortyeightytyeighteenty eighteenth
  • 52100:fortytwelftytytentieth
  • 54000:fortyfourteentytytieth
  • 57340:fortysixteentytwelftyfourteentieth
  • 58010:fortyeighteentytyty tenth
  • 58705:fortyeighteentysixtytenty fifth
  • 59400:fortyeighteentyfourteentytieth
  • 59713:fortyeighteentysixteentytenty thirteenth
  • 60000:sixtytytytieth
  • 60019:sixtytytyty nineteenth
  • 60189:sixtytytyeighteenty ninth
  • 60941:sixtytyeightyfourteenty first
  • 62220:sixtytwentytwentytwentieth
  • 62314:sixtytwentytwentytenty fourteenth
  • 62754:sixtytwentysixtyfourteenty fourteenth
  • 63540:sixtytwentyfourteentyfourteentieth
  • 63965:sixtytwentyeighteentysixteenty fifth
  • 64040:sixtyfortytyfortieth
  • 64943:sixtyfortyeightyfourteenty third
  • 65063:sixtyfortytentysixty third
  • 65064:sixtyfortytentysixty fourth
  • 65661:sixtyfortysixteentysixty first
  • 65700:sixtyfortysixteentytentieth
  • 65809:sixtyfortyeighteentyty ninth
  • 65972:sixtyfortyeighteentysixteenty twelfth
  • 66000:sixtysixtytytieth
  • 69219:sixtyeightytwelftyty nineteenth
  • 69589:sixtyeightyfourteentyeighteenty ninth
  • 69627:sixtyeightysixteentytwenty seventh
  • 70172:sixtytentytysixteenty twelfth
  • 71569:sixtytentyfourteentysixteenty ninth
  • 71600:sixtytentysixteentytieth
  • 71920:sixtytentyeighteentytwelftieth
  • 72171:sixtytwelftytysixteenty eleventh
  • 72180:sixtytwelftytyeighteentieth
  • 73584:sixtytwelftyfourteentyeighteenty fourth
  • 74298:sixtyfourteentytwentyeighty eighteenth
  • 74790:sixtyfourteentysixtyeighteenty tenth
  • 75930:sixtyfourteentyeighteentytwelfty tenth
  • 78000:sixtyeighteentytytieth
  • 78007:sixtyeighteentytyty seventh
  • 79240:sixtyeighteentytwelftyfortieth
  • 79877:sixtyeighteentyeighteentysixty seventeenth
  • 80000:eightytytytieth
  • 83458:eightytwentyfourteentyforty eighteenth
  • 83900:eightytwentyeighteentytentieth
  • 84672:eightyfortysixtysixty twelfth
  • 85892:eightyfortyeighteentyeighty twelfth
  • 85991:eightyfortyeighteentyeighteenty eleventh
  • 86140:eightysixtytyfourteentieth
  • 87608:eightysixtysixteentyty eighth
  • 87861:eightysixtyeighteentysixty first
  • 87954:eightysixtyeighteentyfourteenty fourteenth
  • 88000:eightyeightytytieth
  • 88329:eightyeightytwentytwelfty ninth
  • 88484:eightyeightyfortyeighty fourth
  • 88552:eightyeightyfortyfourteenty twelfth
  • 88860:eightyeightyeightysixtieth
  • 90180:eightytentytyeighteentieth
  • 90935:eightytentyeightytwelfty fifteenth
  • 92555:eightytwelftyfortyfourteenty fifteenth
  • 93174:eightytwelftytentysixteenty fourteenth
  • 93371:eightytwelftytwelftysixteenty eleventh
  • 93610:eightytwelftysixteentyty tenth
  • 93642:eightytwelftysixteentyforty second
  • 94023:eightyfourteentytytwenty third
  • 94175:eightyfourteentytysixteenty fifteenth
  • 94576:eightyfourteentyfortysixteenty sixteenth
  • 94981:eightyfourteentyeightyeighteenty first
  • 95797:eightyfourteentysixteentyeighteenty seventeenth
  • 96134:eightysixteentytytwelfty fourteenth
  • 96826:eightysixteentyeightytwenty sixth
  • 97280:eightysixteentytwelftyeightieth
  • ```
  • ## Scoring
  • This is a [code golf challenge]. Your score is the number of bytes in your code.
  • > Explanations are optional, but I'm more likely to upvote answers that have one.
  • [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
  • # Now posted: [Awkward Ordinals](https://codegolf.codidact.com/posts/293823)
  • ---
  • Write code that takes a positive integer and outputs the awkward ordinal name from the test cases. Notice that these are **not** the [conventional ordinal names](https://en.wikipedia.org/wiki/Ordinal_numeral), although there is significant overlap.
  • You are free to use any approach that happens to pass all the test cases.
  • ## Input
  • - A positive integer from the test cases.
  • - You are not required to support any input not listed in the test cases.
  • ## Output
  • - The corresponding string from the test cases.
  • - This must be in the exact format shown, including having spaces in and only in the specified places.
  • ## Example
  • Given input `224`:
  • - The correct output is `twentytwenty fourth`.
  • - It is incorrect to output `twenty twenty fourth` (due to the extra space).
  • - It is incorrect to output `twentytwentyfourth` (due to the missing space).
  • ## Test cases
  • Test cases are in the format `input:output` where the input is a positive integer, and the output is made up solely of lower case letters and sometimes spaces.
  • There are 248 test cases, spread between 1, 2, 3, 4, and 5 digit inputs.
  • ```text
  • 1:first
  • 2:second
  • 3:third
  • 4:fourth
  • 5:fifth
  • 6:sixth
  • 7:seventh
  • 8:eighth
  • 9:ninth
  • 10:tenth
  • 11:eleventh
  • 12:twelfth
  • 13:thirteenth
  • 14:fourteenth
  • 15:fifteenth
  • 16:sixteenth
  • 17:seventeenth
  • 18:eighteenth
  • 19:nineteenth
  • 20:twentieth
  • 21:twenty first
  • 22:twenty second
  • 23:twenty third
  • 24:twenty fourth
  • 25:twenty fifth
  • 26:twenty sixth
  • 27:twenty seventh
  • 28:twenty eighth
  • 29:twenty ninth
  • 30:twenty tenth
  • 31:twenty eleventh
  • 32:twenty twelfth
  • 33:twenty thirteenth
  • 34:twenty fourteenth
  • 35:twenty fifteenth
  • 36:twenty sixteenth
  • 37:twenty seventeenth
  • 38:twenty eighteenth
  • 39:twenty nineteenth
  • 40:fortieth
  • 41:forty first
  • 44:forty fourth
  • 47:forty seventh
  • 50:forty tenth
  • 53:forty thirteenth
  • 56:forty sixteenth
  • 59:forty nineteenth
  • 62:sixty second
  • 65:sixty fifth
  • 68:sixty eighth
  • 71:sixty eleventh
  • 74:sixty fourteenth
  • 77:sixty seventeenth
  • 80:eightieth
  • 83:eighty third
  • 86:eighty sixth
  • 89:eighty ninth
  • 92:eighty twelfth
  • 95:eighty fifteenth
  • 98:eighty eighteenth
  • 105:tenty fifth
  • 112:tenty twelfth
  • 119:tenty nineteenth
  • 126:twelfty sixth
  • 133:twelfty thirteenth
  • 140:fourteentieth
  • 147:fourteenty seventh
  • 154:fourteenty fourteenth
  • 161:sixteenty first
  • 168:sixteenty eighth
  • 175:sixteenty fifteenth
  • 182:eighteenty second
  • 189:eighteenty ninth
  • 196:eighteenty sixteenth
  • 203:twentyty third
  • 210:twentyty tenth
  • 217:twentyty seventeenth
  • 224:twentytwenty fourth
  • 231:twentytwenty eleventh
  • 250:twentyforty tenth
  • 269:twentysixty ninth
  • 288:twentyeighty eighth
  • 307:twentytenty seventh
  • 326:twentytwelfty sixth
  • 345:twentyfourteenty fifth
  • 364:twentysixteenty fourth
  • 383:twentyeighteenty third
  • 402:fortyty second
  • 421:fortytwenty first
  • 440:fortyfortieth
  • 459:fortyforty nineteenth
  • 478:fortysixty eighteenth
  • 497:fortyeighty seventeenth
  • 516:fortytenty sixteenth
  • 535:fortytwelfty fifteenth
  • 554:fortyfourteenty fourteenth
  • 573:fortysixteenty thirteenth
  • 592:fortyeighteenty twelfth
  • 880:eightyeightieth
  • 1283:twelftyeighty third
  • 1400:fourteentytieth
  • 1617:sixteentyty seventeenth
  • 4360:fortytwentysixteentieth
  • 4895:fortyeightyeighty fifteenth
  • 6802:sixtyeightyty second
  • 6837:sixtyeightytwenty seventeenth
  • 7999:sixtyeighteentyeighteenty nineteenth
  • 8320:eightytwentytwelftieth
  • 8944:eightyeightyfourteenty fourth
  • 9274:eightytwelftysixty fourteenth
  • 9353:eightytwelftyfourteenty thirteenth
  • 10008:tentytyty eighth
  • 10045:tentytyforty fifth
  • 10405:tentyfortyty fifth
  • 10731:tentysixtytwelfty eleventh
  • 10740:tentysixtyfourteentieth
  • 11320:tentytwelftytwelftieth
  • 13206:twelftytwelftyty sixth
  • 13240:twelftytwelftyfortieth
  • 13415:twelftyfourteentyty fifteenth
  • 13471:twelftyfourteentysixty eleventh
  • 14616:fourteentysixtyty sixteenth
  • 15348:fourteentytwelftyfourteenty eighth
  • 15560:fourteentyfourteentysixteentieth
  • 16000:sixteentytytieth
  • 17333:sixteentytwelftytwelfty thirteenth
  • 18066:eighteentytysixty sixth
  • 18263:eighteentytwentysixty third
  • 18976:eighteentyeightysixteenty sixteenth
  • 20017:twentytytyty seventeenth
  • 20018:twentytytyty eighteenth
  • 20260:twentytytwentysixtieth
  • 20955:twentytyeightyfourteenty fifteenth
  • 21445:twentytyfourteentyforty fifth
  • 21553:twentytyfourteentyfourteenty thirteenth
  • 21860:twentytyeighteentysixtieth
  • 25188:twentyfortytentyeighteenty eighth
  • 25529:twentyfortyfourteentytwelfty ninth
  • 27360:twentysixtytwelftysixteentieth
  • 27772:twentysixtysixteentysixteenty twelfth
  • 28061:twentyeightytysixty first
  • 28800:twentyeightyeightytieth
  • 29220:twentyeightytwelftytwentieth
  • 29740:twentyeightysixteentyfourteentieth
  • 29950:twentyeightyeighteentyfourteenty tenth
  • 30340:twentytentytwentyfourteentieth
  • 31036:twentytentytentytwenty sixteenth
  • 31600:twentytentysixteentytieth
  • 33680:twentytwelftysixteentyeightieth
  • 33719:twentytwelftysixteentytenty nineteenth
  • 34019:twentyfourteentytyty nineteenth
  • 34341:twentyfourteentytwentyfourteenty first
  • 34526:twentyfourteentyfortytwelfty sixth
  • 34713:twentyfourteentysixtytenty thirteenth
  • 34715:twentyfourteentysixtytenty fifteenth
  • 36650:twentysixteentysixtyforty tenth
  • 37381:twentysixteentytwelftyeighteenty first
  • 37780:twentysixteentysixteentyeighteentieth
  • 38299:twentyeighteentytwentyeighty nineteenth
  • 38982:twentyeighteentyeightyeighteenty second
  • 40000:fortytytytieth
  • 40907:fortytyeightytenty seventh
  • 41849:fortytyeighteentyforty ninth
  • 42000:fortytwentytytieth
  • 42527:fortytwentyfortytwelfty seventh
  • 43356:fortytwentytwelftyfourteenty sixteenth
  • 43382:fortytwentytwelftyeighteenty second
  • 44003:fortyfortytyty third
  • 45187:fortyfortytentyeighteenty seventh
  • 45208:fortyfortytwelftyty eighth
  • 46220:fortysixtytwentytwentieth
  • 46827:fortysixtyeightytwenty seventh
  • 47436:fortysixtyfourteentytwenty sixteenth
  • 47744:fortysixtysixteentyfourteenty fourth
  • 47800:fortysixtyeighteentytieth
  • 48198:fortyeightytyeighteenty eighteenth
  • 52100:fortytwelftytytentieth
  • 54000:fortyfourteentytytieth
  • 57340:fortysixteentytwelftyfourteentieth
  • 58010:fortyeighteentytyty tenth
  • 58705:fortyeighteentysixtytenty fifth
  • 59400:fortyeighteentyfourteentytieth
  • 59713:fortyeighteentysixteentytenty thirteenth
  • 60000:sixtytytytieth
  • 60019:sixtytytyty nineteenth
  • 60189:sixtytytyeighteenty ninth
  • 60941:sixtytyeightyfourteenty first
  • 62220:sixtytwentytwentytwentieth
  • 62314:sixtytwentytwentytenty fourteenth
  • 62754:sixtytwentysixtyfourteenty fourteenth
  • 63540:sixtytwentyfourteentyfourteentieth
  • 63965:sixtytwentyeighteentysixteenty fifth
  • 64040:sixtyfortytyfortieth
  • 64943:sixtyfortyeightyfourteenty third
  • 65063:sixtyfortytentysixty third
  • 65064:sixtyfortytentysixty fourth
  • 65661:sixtyfortysixteentysixty first
  • 65700:sixtyfortysixteentytentieth
  • 65809:sixtyfortyeighteentyty ninth
  • 65972:sixtyfortyeighteentysixteenty twelfth
  • 66000:sixtysixtytytieth
  • 69219:sixtyeightytwelftyty nineteenth
  • 69589:sixtyeightyfourteentyeighteenty ninth
  • 69627:sixtyeightysixteentytwenty seventh
  • 70172:sixtytentytysixteenty twelfth
  • 71569:sixtytentyfourteentysixteenty ninth
  • 71600:sixtytentysixteentytieth
  • 71920:sixtytentyeighteentytwelftieth
  • 72171:sixtytwelftytysixteenty eleventh
  • 72180:sixtytwelftytyeighteentieth
  • 73584:sixtytwelftyfourteentyeighteenty fourth
  • 74298:sixtyfourteentytwentyeighty eighteenth
  • 74790:sixtyfourteentysixtyeighteenty tenth
  • 75930:sixtyfourteentyeighteentytwelfty tenth
  • 78000:sixtyeighteentytytieth
  • 78007:sixtyeighteentytyty seventh
  • 79240:sixtyeighteentytwelftyfortieth
  • 79877:sixtyeighteentyeighteentysixty seventeenth
  • 80000:eightytytytieth
  • 83458:eightytwentyfourteentyforty eighteenth
  • 83900:eightytwentyeighteentytentieth
  • 84672:eightyfortysixtysixty twelfth
  • 85892:eightyfortyeighteentyeighty twelfth
  • 85991:eightyfortyeighteentyeighteenty eleventh
  • 86140:eightysixtytyfourteentieth
  • 87608:eightysixtysixteentyty eighth
  • 87861:eightysixtyeighteentysixty first
  • 87954:eightysixtyeighteentyfourteenty fourteenth
  • 88000:eightyeightytytieth
  • 88329:eightyeightytwentytwelfty ninth
  • 88484:eightyeightyfortyeighty fourth
  • 88552:eightyeightyfortyfourteenty twelfth
  • 88860:eightyeightyeightysixtieth
  • 90180:eightytentytyeighteentieth
  • 90935:eightytentyeightytwelfty fifteenth
  • 92555:eightytwelftyfortyfourteenty fifteenth
  • 93174:eightytwelftytentysixteenty fourteenth
  • 93371:eightytwelftytwelftysixteenty eleventh
  • 93610:eightytwelftysixteentyty tenth
  • 93642:eightytwelftysixteentyforty second
  • 94023:eightyfourteentytytwenty third
  • 94175:eightyfourteentytysixteenty fifteenth
  • 94576:eightyfourteentyfortysixteenty sixteenth
  • 94981:eightyfourteentyeightyeighteenty first
  • 95797:eightyfourteentysixteentyeighteenty seventeenth
  • 96134:eightysixteentytytwelfty fourteenth
  • 96826:eightysixteentyeightytwenty sixth
  • 97280:eightysixteentytwelftyeightieth
  • ```
  • ## Scoring
  • This is a [code golf challenge]. Your score is the number of bytes in your code.
  • > Explanations are optional, but I'm more likely to upvote answers that have one.
  • [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#7: Post edited by user avatar trichoplax‭ · 2025-04-18T23:18:09Z (3 days ago)
Emphasise these are not conventional ordinal names
  • Write code that takes a positive integer and outputs the awkward ordinal name from the test cases. Notice that these are not the [conventional ordinal names](https://en.wikipedia.org/wiki/Ordinal_numeral), although there is significant overlap.
  • You are free to use any approach that happens to pass all the test cases.
  • ## Input
  • - A positive integer from the test cases.
  • - You are not required to support any input not listed in the test cases.
  • ## Output
  • - The corresponding string from the test cases.
  • - This must be in the exact format shown, including having spaces in and only in the specified places.
  • ## Example
  • Given input `224`:
  • - The correct output is `twentytwenty fourth`.
  • - It is incorrect to output `twenty twenty fourth` (due to the extra space).
  • - It is incorrect to output `twentytwentyfourth` (due to the missing space).
  • ## Test cases
  • Test cases are in the format `input:output` where the input is a positive integer, and the output is made up solely of lower case letters and sometimes spaces.
  • There are 248 test cases, spread between 1, 2, 3, 4, and 5 digit inputs.
  • ```text
  • 1:first
  • 2:second
  • 3:third
  • 4:fourth
  • 5:fifth
  • 6:sixth
  • 7:seventh
  • 8:eighth
  • 9:ninth
  • 10:tenth
  • 11:eleventh
  • 12:twelfth
  • 13:thirteenth
  • 14:fourteenth
  • 15:fifteenth
  • 16:sixteenth
  • 17:seventeenth
  • 18:eighteenth
  • 19:nineteenth
  • 20:twentieth
  • 21:twenty first
  • 22:twenty second
  • 23:twenty third
  • 24:twenty fourth
  • 25:twenty fifth
  • 26:twenty sixth
  • 27:twenty seventh
  • 28:twenty eighth
  • 29:twenty ninth
  • 30:twenty tenth
  • 31:twenty eleventh
  • 32:twenty twelfth
  • 33:twenty thirteenth
  • 34:twenty fourteenth
  • 35:twenty fifteenth
  • 36:twenty sixteenth
  • 37:twenty seventeenth
  • 38:twenty eighteenth
  • 39:twenty nineteenth
  • 40:fortieth
  • 41:forty first
  • 44:forty fourth
  • 47:forty seventh
  • 50:forty tenth
  • 53:forty thirteenth
  • 56:forty sixteenth
  • 59:forty nineteenth
  • 62:sixty second
  • 65:sixty fifth
  • 68:sixty eighth
  • 71:sixty eleventh
  • 74:sixty fourteenth
  • 77:sixty seventeenth
  • 80:eightieth
  • 83:eighty third
  • 86:eighty sixth
  • 89:eighty ninth
  • 92:eighty twelfth
  • 95:eighty fifteenth
  • 98:eighty eighteenth
  • 105:tenty fifth
  • 112:tenty twelfth
  • 119:tenty nineteenth
  • 126:twelfty sixth
  • 133:twelfty thirteenth
  • 140:fourteentieth
  • 147:fourteenty seventh
  • 154:fourteenty fourteenth
  • 161:sixteenty first
  • 168:sixteenty eighth
  • 175:sixteenty fifteenth
  • 182:eighteenty second
  • 189:eighteenty ninth
  • 196:eighteenty sixteenth
  • 203:twentyty third
  • 210:twentyty tenth
  • 217:twentyty seventeenth
  • 224:twentytwenty fourth
  • 231:twentytwenty eleventh
  • 250:twentyforty tenth
  • 269:twentysixty ninth
  • 288:twentyeighty eighth
  • 307:twentytenty seventh
  • 326:twentytwelfty sixth
  • 345:twentyfourteenty fifth
  • 364:twentysixteenty fourth
  • 383:twentyeighteenty third
  • 402:fortyty second
  • 421:fortytwenty first
  • 440:fortyfortieth
  • 459:fortyforty nineteenth
  • 478:fortysixty eighteenth
  • 497:fortyeighty seventeenth
  • 516:fortytenty sixteenth
  • 535:fortytwelfty fifteenth
  • 554:fortyfourteenty fourteenth
  • 573:fortysixteenty thirteenth
  • 592:fortyeighteenty twelfth
  • 880:eightyeightieth
  • 1283:twelftyeighty third
  • 1400:fourteentytieth
  • 1617:sixteentyty seventeenth
  • 4360:fortytwentysixteentieth
  • 4895:fortyeightyeighty fifteenth
  • 6802:sixtyeightyty second
  • 6837:sixtyeightytwenty seventeenth
  • 7999:sixtyeighteentyeighteenty nineteenth
  • 8320:eightytwentytwelftieth
  • 8944:eightyeightyfourteenty fourth
  • 9274:eightytwelftysixty fourteenth
  • 9353:eightytwelftyfourteenty thirteenth
  • 10008:tentytyty eighth
  • 10045:tentytyforty fifth
  • 10405:tentyfortyty fifth
  • 10731:tentysixtytwelfty eleventh
  • 10740:tentysixtyfourteentieth
  • 11320:tentytwelftytwelftieth
  • 13206:twelftytwelftyty sixth
  • 13240:twelftytwelftyfortieth
  • 13415:twelftyfourteentyty fifteenth
  • 13471:twelftyfourteentysixty eleventh
  • 14616:fourteentysixtyty sixteenth
  • 15348:fourteentytwelftyfourteenty eighth
  • 15560:fourteentyfourteentysixteentieth
  • 16000:sixteentytytieth
  • 17333:sixteentytwelftytwelfty thirteenth
  • 18066:eighteentytysixty sixth
  • 18263:eighteentytwentysixty third
  • 18976:eighteentyeightysixteenty sixteenth
  • 20017:twentytytyty seventeenth
  • 20018:twentytytyty eighteenth
  • 20260:twentytytwentysixtieth
  • 20955:twentytyeightyfourteenty fifteenth
  • 21445:twentytyfourteentyforty fifth
  • 21553:twentytyfourteentyfourteenty thirteenth
  • 21860:twentytyeighteentysixtieth
  • 25188:twentyfortytentyeighteenty eighth
  • 25529:twentyfortyfourteentytwelfty ninth
  • 27360:twentysixtytwelftysixteentieth
  • 27772:twentysixtysixteentysixteenty twelfth
  • 28061:twentyeightytysixty first
  • 28800:twentyeightyeightytieth
  • 29220:twentyeightytwelftytwentieth
  • 29740:twentyeightysixteentyfourteentieth
  • 29950:twentyeightyeighteentyfourteenty tenth
  • 30340:twentytentytwentyfourteentieth
  • 31036:twentytentytentytwenty sixteenth
  • 31600:twentytentysixteentytieth
  • 33680:twentytwelftysixteentyeightieth
  • 33719:twentytwelftysixteentytenty nineteenth
  • 34019:twentyfourteentytyty nineteenth
  • 34341:twentyfourteentytwentyfourteenty first
  • 34526:twentyfourteentyfortytwelfty sixth
  • 34713:twentyfourteentysixtytenty thirteenth
  • 34715:twentyfourteentysixtytenty fifteenth
  • 36650:twentysixteentysixtyforty tenth
  • 37381:twentysixteentytwelftyeighteenty first
  • 37780:twentysixteentysixteentyeighteentieth
  • 38299:twentyeighteentytwentyeighty nineteenth
  • 38982:twentyeighteentyeightyeighteenty second
  • 40000:fortytytytieth
  • 40907:fortytyeightytenty seventh
  • 41849:fortytyeighteentyforty ninth
  • 42000:fortytwentytytieth
  • 42527:fortytwentyfortytwelfty seventh
  • 43356:fortytwentytwelftyfourteenty sixteenth
  • 43382:fortytwentytwelftyeighteenty second
  • 44003:fortyfortytyty third
  • 45187:fortyfortytentyeighteenty seventh
  • 45208:fortyfortytwelftyty eighth
  • 46220:fortysixtytwentytwentieth
  • 46827:fortysixtyeightytwenty seventh
  • 47436:fortysixtyfourteentytwenty sixteenth
  • 47744:fortysixtysixteentyfourteenty fourth
  • 47800:fortysixtyeighteentytieth
  • 48198:fortyeightytyeighteenty eighteenth
  • 52100:fortytwelftytytentieth
  • 54000:fortyfourteentytytieth
  • 57340:fortysixteentytwelftyfourteentieth
  • 58010:fortyeighteentytyty tenth
  • 58705:fortyeighteentysixtytenty fifth
  • 59400:fortyeighteentyfourteentytieth
  • 59713:fortyeighteentysixteentytenty thirteenth
  • 60000:sixtytytytieth
  • 60019:sixtytytyty nineteenth
  • 60189:sixtytytyeighteenty ninth
  • 60941:sixtytyeightyfourteenty first
  • 62220:sixtytwentytwentytwentieth
  • 62314:sixtytwentytwentytenty fourteenth
  • 62754:sixtytwentysixtyfourteenty fourteenth
  • 63540:sixtytwentyfourteentyfourteentieth
  • 63965:sixtytwentyeighteentysixteenty fifth
  • 64040:sixtyfortytyfortieth
  • 64943:sixtyfortyeightyfourteenty third
  • 65063:sixtyfortytentysixty third
  • 65064:sixtyfortytentysixty fourth
  • 65661:sixtyfortysixteentysixty first
  • 65700:sixtyfortysixteentytentieth
  • 65809:sixtyfortyeighteentyty ninth
  • 65972:sixtyfortyeighteentysixteenty twelfth
  • 66000:sixtysixtytytieth
  • 69219:sixtyeightytwelftyty nineteenth
  • 69589:sixtyeightyfourteentyeighteenty ninth
  • 69627:sixtyeightysixteentytwenty seventh
  • 70172:sixtytentytysixteenty twelfth
  • 71569:sixtytentyfourteentysixteenty ninth
  • 71600:sixtytentysixteentytieth
  • 71920:sixtytentyeighteentytwelftieth
  • 72171:sixtytwelftytysixteenty eleventh
  • 72180:sixtytwelftytyeighteentieth
  • 73584:sixtytwelftyfourteentyeighteenty fourth
  • 74298:sixtyfourteentytwentyeighty eighteenth
  • 74790:sixtyfourteentysixtyeighteenty tenth
  • 75930:sixtyfourteentyeighteentytwelfty tenth
  • 78000:sixtyeighteentytytieth
  • 78007:sixtyeighteentytyty seventh
  • 79240:sixtyeighteentytwelftyfortieth
  • 79877:sixtyeighteentyeighteentysixty seventeenth
  • 80000:eightytytytieth
  • 83458:eightytwentyfourteentyforty eighteenth
  • 83900:eightytwentyeighteentytentieth
  • 84672:eightyfortysixtysixty twelfth
  • 85892:eightyfortyeighteentyeighty twelfth
  • 85991:eightyfortyeighteentyeighteenty eleventh
  • 86140:eightysixtytyfourteentieth
  • 87608:eightysixtysixteentyty eighth
  • 87861:eightysixtyeighteentysixty first
  • 87954:eightysixtyeighteentyfourteenty fourteenth
  • 88000:eightyeightytytieth
  • 88329:eightyeightytwentytwelfty ninth
  • 88484:eightyeightyfortyeighty fourth
  • 88552:eightyeightyfortyfourteenty twelfth
  • 88860:eightyeightyeightysixtieth
  • 90180:eightytentytyeighteentieth
  • 90935:eightytentyeightytwelfty fifteenth
  • 92555:eightytwelftyfortyfourteenty fifteenth
  • 93174:eightytwelftytentysixteenty fourteenth
  • 93371:eightytwelftytwelftysixteenty eleventh
  • 93610:eightytwelftysixteentyty tenth
  • 93642:eightytwelftysixteentyforty second
  • 94023:eightyfourteentytytwenty third
  • 94175:eightyfourteentytysixteenty fifteenth
  • 94576:eightyfourteentyfortysixteenty sixteenth
  • 94981:eightyfourteentyeightyeighteenty first
  • 95797:eightyfourteentysixteentyeighteenty seventeenth
  • 96134:eightysixteentytytwelfty fourteenth
  • 96826:eightysixteentyeightytwenty sixth
  • 97280:eightysixteentytwelftyeightieth
  • ```
  • ## Scoring
  • This is a [code golf challenge]. Your score is the number of bytes in your code.
  • > Explanations are optional, but I'm more likely to upvote answers that have one.
  • [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
  • Write code that takes a positive integer and outputs the awkward ordinal name from the test cases. Notice that these are **not** the [conventional ordinal names](https://en.wikipedia.org/wiki/Ordinal_numeral), although there is significant overlap.
  • You are free to use any approach that happens to pass all the test cases.
  • ## Input
  • - A positive integer from the test cases.
  • - You are not required to support any input not listed in the test cases.
  • ## Output
  • - The corresponding string from the test cases.
  • - This must be in the exact format shown, including having spaces in and only in the specified places.
  • ## Example
  • Given input `224`:
  • - The correct output is `twentytwenty fourth`.
  • - It is incorrect to output `twenty twenty fourth` (due to the extra space).
  • - It is incorrect to output `twentytwentyfourth` (due to the missing space).
  • ## Test cases
  • Test cases are in the format `input:output` where the input is a positive integer, and the output is made up solely of lower case letters and sometimes spaces.
  • There are 248 test cases, spread between 1, 2, 3, 4, and 5 digit inputs.
  • ```text
  • 1:first
  • 2:second
  • 3:third
  • 4:fourth
  • 5:fifth
  • 6:sixth
  • 7:seventh
  • 8:eighth
  • 9:ninth
  • 10:tenth
  • 11:eleventh
  • 12:twelfth
  • 13:thirteenth
  • 14:fourteenth
  • 15:fifteenth
  • 16:sixteenth
  • 17:seventeenth
  • 18:eighteenth
  • 19:nineteenth
  • 20:twentieth
  • 21:twenty first
  • 22:twenty second
  • 23:twenty third
  • 24:twenty fourth
  • 25:twenty fifth
  • 26:twenty sixth
  • 27:twenty seventh
  • 28:twenty eighth
  • 29:twenty ninth
  • 30:twenty tenth
  • 31:twenty eleventh
  • 32:twenty twelfth
  • 33:twenty thirteenth
  • 34:twenty fourteenth
  • 35:twenty fifteenth
  • 36:twenty sixteenth
  • 37:twenty seventeenth
  • 38:twenty eighteenth
  • 39:twenty nineteenth
  • 40:fortieth
  • 41:forty first
  • 44:forty fourth
  • 47:forty seventh
  • 50:forty tenth
  • 53:forty thirteenth
  • 56:forty sixteenth
  • 59:forty nineteenth
  • 62:sixty second
  • 65:sixty fifth
  • 68:sixty eighth
  • 71:sixty eleventh
  • 74:sixty fourteenth
  • 77:sixty seventeenth
  • 80:eightieth
  • 83:eighty third
  • 86:eighty sixth
  • 89:eighty ninth
  • 92:eighty twelfth
  • 95:eighty fifteenth
  • 98:eighty eighteenth
  • 105:tenty fifth
  • 112:tenty twelfth
  • 119:tenty nineteenth
  • 126:twelfty sixth
  • 133:twelfty thirteenth
  • 140:fourteentieth
  • 147:fourteenty seventh
  • 154:fourteenty fourteenth
  • 161:sixteenty first
  • 168:sixteenty eighth
  • 175:sixteenty fifteenth
  • 182:eighteenty second
  • 189:eighteenty ninth
  • 196:eighteenty sixteenth
  • 203:twentyty third
  • 210:twentyty tenth
  • 217:twentyty seventeenth
  • 224:twentytwenty fourth
  • 231:twentytwenty eleventh
  • 250:twentyforty tenth
  • 269:twentysixty ninth
  • 288:twentyeighty eighth
  • 307:twentytenty seventh
  • 326:twentytwelfty sixth
  • 345:twentyfourteenty fifth
  • 364:twentysixteenty fourth
  • 383:twentyeighteenty third
  • 402:fortyty second
  • 421:fortytwenty first
  • 440:fortyfortieth
  • 459:fortyforty nineteenth
  • 478:fortysixty eighteenth
  • 497:fortyeighty seventeenth
  • 516:fortytenty sixteenth
  • 535:fortytwelfty fifteenth
  • 554:fortyfourteenty fourteenth
  • 573:fortysixteenty thirteenth
  • 592:fortyeighteenty twelfth
  • 880:eightyeightieth
  • 1283:twelftyeighty third
  • 1400:fourteentytieth
  • 1617:sixteentyty seventeenth
  • 4360:fortytwentysixteentieth
  • 4895:fortyeightyeighty fifteenth
  • 6802:sixtyeightyty second
  • 6837:sixtyeightytwenty seventeenth
  • 7999:sixtyeighteentyeighteenty nineteenth
  • 8320:eightytwentytwelftieth
  • 8944:eightyeightyfourteenty fourth
  • 9274:eightytwelftysixty fourteenth
  • 9353:eightytwelftyfourteenty thirteenth
  • 10008:tentytyty eighth
  • 10045:tentytyforty fifth
  • 10405:tentyfortyty fifth
  • 10731:tentysixtytwelfty eleventh
  • 10740:tentysixtyfourteentieth
  • 11320:tentytwelftytwelftieth
  • 13206:twelftytwelftyty sixth
  • 13240:twelftytwelftyfortieth
  • 13415:twelftyfourteentyty fifteenth
  • 13471:twelftyfourteentysixty eleventh
  • 14616:fourteentysixtyty sixteenth
  • 15348:fourteentytwelftyfourteenty eighth
  • 15560:fourteentyfourteentysixteentieth
  • 16000:sixteentytytieth
  • 17333:sixteentytwelftytwelfty thirteenth
  • 18066:eighteentytysixty sixth
  • 18263:eighteentytwentysixty third
  • 18976:eighteentyeightysixteenty sixteenth
  • 20017:twentytytyty seventeenth
  • 20018:twentytytyty eighteenth
  • 20260:twentytytwentysixtieth
  • 20955:twentytyeightyfourteenty fifteenth
  • 21445:twentytyfourteentyforty fifth
  • 21553:twentytyfourteentyfourteenty thirteenth
  • 21860:twentytyeighteentysixtieth
  • 25188:twentyfortytentyeighteenty eighth
  • 25529:twentyfortyfourteentytwelfty ninth
  • 27360:twentysixtytwelftysixteentieth
  • 27772:twentysixtysixteentysixteenty twelfth
  • 28061:twentyeightytysixty first
  • 28800:twentyeightyeightytieth
  • 29220:twentyeightytwelftytwentieth
  • 29740:twentyeightysixteentyfourteentieth
  • 29950:twentyeightyeighteentyfourteenty tenth
  • 30340:twentytentytwentyfourteentieth
  • 31036:twentytentytentytwenty sixteenth
  • 31600:twentytentysixteentytieth
  • 33680:twentytwelftysixteentyeightieth
  • 33719:twentytwelftysixteentytenty nineteenth
  • 34019:twentyfourteentytyty nineteenth
  • 34341:twentyfourteentytwentyfourteenty first
  • 34526:twentyfourteentyfortytwelfty sixth
  • 34713:twentyfourteentysixtytenty thirteenth
  • 34715:twentyfourteentysixtytenty fifteenth
  • 36650:twentysixteentysixtyforty tenth
  • 37381:twentysixteentytwelftyeighteenty first
  • 37780:twentysixteentysixteentyeighteentieth
  • 38299:twentyeighteentytwentyeighty nineteenth
  • 38982:twentyeighteentyeightyeighteenty second
  • 40000:fortytytytieth
  • 40907:fortytyeightytenty seventh
  • 41849:fortytyeighteentyforty ninth
  • 42000:fortytwentytytieth
  • 42527:fortytwentyfortytwelfty seventh
  • 43356:fortytwentytwelftyfourteenty sixteenth
  • 43382:fortytwentytwelftyeighteenty second
  • 44003:fortyfortytyty third
  • 45187:fortyfortytentyeighteenty seventh
  • 45208:fortyfortytwelftyty eighth
  • 46220:fortysixtytwentytwentieth
  • 46827:fortysixtyeightytwenty seventh
  • 47436:fortysixtyfourteentytwenty sixteenth
  • 47744:fortysixtysixteentyfourteenty fourth
  • 47800:fortysixtyeighteentytieth
  • 48198:fortyeightytyeighteenty eighteenth
  • 52100:fortytwelftytytentieth
  • 54000:fortyfourteentytytieth
  • 57340:fortysixteentytwelftyfourteentieth
  • 58010:fortyeighteentytyty tenth
  • 58705:fortyeighteentysixtytenty fifth
  • 59400:fortyeighteentyfourteentytieth
  • 59713:fortyeighteentysixteentytenty thirteenth
  • 60000:sixtytytytieth
  • 60019:sixtytytyty nineteenth
  • 60189:sixtytytyeighteenty ninth
  • 60941:sixtytyeightyfourteenty first
  • 62220:sixtytwentytwentytwentieth
  • 62314:sixtytwentytwentytenty fourteenth
  • 62754:sixtytwentysixtyfourteenty fourteenth
  • 63540:sixtytwentyfourteentyfourteentieth
  • 63965:sixtytwentyeighteentysixteenty fifth
  • 64040:sixtyfortytyfortieth
  • 64943:sixtyfortyeightyfourteenty third
  • 65063:sixtyfortytentysixty third
  • 65064:sixtyfortytentysixty fourth
  • 65661:sixtyfortysixteentysixty first
  • 65700:sixtyfortysixteentytentieth
  • 65809:sixtyfortyeighteentyty ninth
  • 65972:sixtyfortyeighteentysixteenty twelfth
  • 66000:sixtysixtytytieth
  • 69219:sixtyeightytwelftyty nineteenth
  • 69589:sixtyeightyfourteentyeighteenty ninth
  • 69627:sixtyeightysixteentytwenty seventh
  • 70172:sixtytentytysixteenty twelfth
  • 71569:sixtytentyfourteentysixteenty ninth
  • 71600:sixtytentysixteentytieth
  • 71920:sixtytentyeighteentytwelftieth
  • 72171:sixtytwelftytysixteenty eleventh
  • 72180:sixtytwelftytyeighteentieth
  • 73584:sixtytwelftyfourteentyeighteenty fourth
  • 74298:sixtyfourteentytwentyeighty eighteenth
  • 74790:sixtyfourteentysixtyeighteenty tenth
  • 75930:sixtyfourteentyeighteentytwelfty tenth
  • 78000:sixtyeighteentytytieth
  • 78007:sixtyeighteentytyty seventh
  • 79240:sixtyeighteentytwelftyfortieth
  • 79877:sixtyeighteentyeighteentysixty seventeenth
  • 80000:eightytytytieth
  • 83458:eightytwentyfourteentyforty eighteenth
  • 83900:eightytwentyeighteentytentieth
  • 84672:eightyfortysixtysixty twelfth
  • 85892:eightyfortyeighteentyeighty twelfth
  • 85991:eightyfortyeighteentyeighteenty eleventh
  • 86140:eightysixtytyfourteentieth
  • 87608:eightysixtysixteentyty eighth
  • 87861:eightysixtyeighteentysixty first
  • 87954:eightysixtyeighteentyfourteenty fourteenth
  • 88000:eightyeightytytieth
  • 88329:eightyeightytwentytwelfty ninth
  • 88484:eightyeightyfortyeighty fourth
  • 88552:eightyeightyfortyfourteenty twelfth
  • 88860:eightyeightyeightysixtieth
  • 90180:eightytentytyeighteentieth
  • 90935:eightytentyeightytwelfty fifteenth
  • 92555:eightytwelftyfortyfourteenty fifteenth
  • 93174:eightytwelftytentysixteenty fourteenth
  • 93371:eightytwelftytwelftysixteenty eleventh
  • 93610:eightytwelftysixteentyty tenth
  • 93642:eightytwelftysixteentyforty second
  • 94023:eightyfourteentytytwenty third
  • 94175:eightyfourteentytysixteenty fifteenth
  • 94576:eightyfourteentyfortysixteenty sixteenth
  • 94981:eightyfourteentyeightyeighteenty first
  • 95797:eightyfourteentysixteentyeighteenty seventeenth
  • 96134:eightysixteentytytwelfty fourteenth
  • 96826:eightysixteentyeightytwenty sixth
  • 97280:eightysixteentytwelftyeightieth
  • ```
  • ## Scoring
  • This is a [code golf challenge]. Your score is the number of bytes in your code.
  • > Explanations are optional, but I'm more likely to upvote answers that have one.
  • [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#6: Post edited by user avatar trichoplax‭ · 2025-04-18T23:16:44Z (3 days ago)
Remove promise of explanation
  • Write code that takes a positive integer and outputs the awkward ordinal name from the test cases. Notice that these are not the [conventional ordinal names](https://en.wikipedia.org/wiki/Ordinal_numeral), although there is significant overlap.
  • ## Explanation
  • I considered including an algorithm in the challenge specification, but instead decided to just provide test cases. If no correct answers arrive I will eventually post an answer of my own as an explanatory example, so feel free to wait until then if working from test cases doesn’t appeal.
  • You are also free to use any approach that happens to pass all the test cases.
  • ## Input
  • - A positive integer from the test cases.
  • - You are not required to support any input not listed in the test cases.
  • ## Output
  • - The corresponding string from the test cases.
  • - This must be in the exact format shown, including having spaces in and only in the specified places.
  • ## Example
  • Given input `224`:
  • - The correct output is `twentytwenty fourth`.
  • - It is incorrect to output `twenty twenty fourth` (due to the extra space).
  • - It is incorrect to output `twentytwentyfourth` (due to the missing space).
  • ## Test cases
  • Test cases are in the format `input:output` where the input is a positive integer, and the output is made up solely of lower case letters and sometimes spaces.
  • There are 248 test cases, spread between 1, 2, 3, 4, and 5 digit inputs.
  • ```text
  • 1:first
  • 2:second
  • 3:third
  • 4:fourth
  • 5:fifth
  • 6:sixth
  • 7:seventh
  • 8:eighth
  • 9:ninth
  • 10:tenth
  • 11:eleventh
  • 12:twelfth
  • 13:thirteenth
  • 14:fourteenth
  • 15:fifteenth
  • 16:sixteenth
  • 17:seventeenth
  • 18:eighteenth
  • 19:nineteenth
  • 20:twentieth
  • 21:twenty first
  • 22:twenty second
  • 23:twenty third
  • 24:twenty fourth
  • 25:twenty fifth
  • 26:twenty sixth
  • 27:twenty seventh
  • 28:twenty eighth
  • 29:twenty ninth
  • 30:twenty tenth
  • 31:twenty eleventh
  • 32:twenty twelfth
  • 33:twenty thirteenth
  • 34:twenty fourteenth
  • 35:twenty fifteenth
  • 36:twenty sixteenth
  • 37:twenty seventeenth
  • 38:twenty eighteenth
  • 39:twenty nineteenth
  • 40:fortieth
  • 41:forty first
  • 44:forty fourth
  • 47:forty seventh
  • 50:forty tenth
  • 53:forty thirteenth
  • 56:forty sixteenth
  • 59:forty nineteenth
  • 62:sixty second
  • 65:sixty fifth
  • 68:sixty eighth
  • 71:sixty eleventh
  • 74:sixty fourteenth
  • 77:sixty seventeenth
  • 80:eightieth
  • 83:eighty third
  • 86:eighty sixth
  • 89:eighty ninth
  • 92:eighty twelfth
  • 95:eighty fifteenth
  • 98:eighty eighteenth
  • 105:tenty fifth
  • 112:tenty twelfth
  • 119:tenty nineteenth
  • 126:twelfty sixth
  • 133:twelfty thirteenth
  • 140:fourteentieth
  • 147:fourteenty seventh
  • 154:fourteenty fourteenth
  • 161:sixteenty first
  • 168:sixteenty eighth
  • 175:sixteenty fifteenth
  • 182:eighteenty second
  • 189:eighteenty ninth
  • 196:eighteenty sixteenth
  • 203:twentyty third
  • 210:twentyty tenth
  • 217:twentyty seventeenth
  • 224:twentytwenty fourth
  • 231:twentytwenty eleventh
  • 250:twentyforty tenth
  • 269:twentysixty ninth
  • 288:twentyeighty eighth
  • 307:twentytenty seventh
  • 326:twentytwelfty sixth
  • 345:twentyfourteenty fifth
  • 364:twentysixteenty fourth
  • 383:twentyeighteenty third
  • 402:fortyty second
  • 421:fortytwenty first
  • 440:fortyfortieth
  • 459:fortyforty nineteenth
  • 478:fortysixty eighteenth
  • 497:fortyeighty seventeenth
  • 516:fortytenty sixteenth
  • 535:fortytwelfty fifteenth
  • 554:fortyfourteenty fourteenth
  • 573:fortysixteenty thirteenth
  • 592:fortyeighteenty twelfth
  • 880:eightyeightieth
  • 1283:twelftyeighty third
  • 1400:fourteentytieth
  • 1617:sixteentyty seventeenth
  • 4360:fortytwentysixteentieth
  • 4895:fortyeightyeighty fifteenth
  • 6802:sixtyeightyty second
  • 6837:sixtyeightytwenty seventeenth
  • 7999:sixtyeighteentyeighteenty nineteenth
  • 8320:eightytwentytwelftieth
  • 8944:eightyeightyfourteenty fourth
  • 9274:eightytwelftysixty fourteenth
  • 9353:eightytwelftyfourteenty thirteenth
  • 10008:tentytyty eighth
  • 10045:tentytyforty fifth
  • 10405:tentyfortyty fifth
  • 10731:tentysixtytwelfty eleventh
  • 10740:tentysixtyfourteentieth
  • 11320:tentytwelftytwelftieth
  • 13206:twelftytwelftyty sixth
  • 13240:twelftytwelftyfortieth
  • 13415:twelftyfourteentyty fifteenth
  • 13471:twelftyfourteentysixty eleventh
  • 14616:fourteentysixtyty sixteenth
  • 15348:fourteentytwelftyfourteenty eighth
  • 15560:fourteentyfourteentysixteentieth
  • 16000:sixteentytytieth
  • 17333:sixteentytwelftytwelfty thirteenth
  • 18066:eighteentytysixty sixth
  • 18263:eighteentytwentysixty third
  • 18976:eighteentyeightysixteenty sixteenth
  • 20017:twentytytyty seventeenth
  • 20018:twentytytyty eighteenth
  • 20260:twentytytwentysixtieth
  • 20955:twentytyeightyfourteenty fifteenth
  • 21445:twentytyfourteentyforty fifth
  • 21553:twentytyfourteentyfourteenty thirteenth
  • 21860:twentytyeighteentysixtieth
  • 25188:twentyfortytentyeighteenty eighth
  • 25529:twentyfortyfourteentytwelfty ninth
  • 27360:twentysixtytwelftysixteentieth
  • 27772:twentysixtysixteentysixteenty twelfth
  • 28061:twentyeightytysixty first
  • 28800:twentyeightyeightytieth
  • 29220:twentyeightytwelftytwentieth
  • 29740:twentyeightysixteentyfourteentieth
  • 29950:twentyeightyeighteentyfourteenty tenth
  • 30340:twentytentytwentyfourteentieth
  • 31036:twentytentytentytwenty sixteenth
  • 31600:twentytentysixteentytieth
  • 33680:twentytwelftysixteentyeightieth
  • 33719:twentytwelftysixteentytenty nineteenth
  • 34019:twentyfourteentytyty nineteenth
  • 34341:twentyfourteentytwentyfourteenty first
  • 34526:twentyfourteentyfortytwelfty sixth
  • 34713:twentyfourteentysixtytenty thirteenth
  • 34715:twentyfourteentysixtytenty fifteenth
  • 36650:twentysixteentysixtyforty tenth
  • 37381:twentysixteentytwelftyeighteenty first
  • 37780:twentysixteentysixteentyeighteentieth
  • 38299:twentyeighteentytwentyeighty nineteenth
  • 38982:twentyeighteentyeightyeighteenty second
  • 40000:fortytytytieth
  • 40907:fortytyeightytenty seventh
  • 41849:fortytyeighteentyforty ninth
  • 42000:fortytwentytytieth
  • 42527:fortytwentyfortytwelfty seventh
  • 43356:fortytwentytwelftyfourteenty sixteenth
  • 43382:fortytwentytwelftyeighteenty second
  • 44003:fortyfortytyty third
  • 45187:fortyfortytentyeighteenty seventh
  • 45208:fortyfortytwelftyty eighth
  • 46220:fortysixtytwentytwentieth
  • 46827:fortysixtyeightytwenty seventh
  • 47436:fortysixtyfourteentytwenty sixteenth
  • 47744:fortysixtysixteentyfourteenty fourth
  • 47800:fortysixtyeighteentytieth
  • 48198:fortyeightytyeighteenty eighteenth
  • 52100:fortytwelftytytentieth
  • 54000:fortyfourteentytytieth
  • 57340:fortysixteentytwelftyfourteentieth
  • 58010:fortyeighteentytyty tenth
  • 58705:fortyeighteentysixtytenty fifth
  • 59400:fortyeighteentyfourteentytieth
  • 59713:fortyeighteentysixteentytenty thirteenth
  • 60000:sixtytytytieth
  • 60019:sixtytytyty nineteenth
  • 60189:sixtytytyeighteenty ninth
  • 60941:sixtytyeightyfourteenty first
  • 62220:sixtytwentytwentytwentieth
  • 62314:sixtytwentytwentytenty fourteenth
  • 62754:sixtytwentysixtyfourteenty fourteenth
  • 63540:sixtytwentyfourteentyfourteentieth
  • 63965:sixtytwentyeighteentysixteenty fifth
  • 64040:sixtyfortytyfortieth
  • 64943:sixtyfortyeightyfourteenty third
  • 65063:sixtyfortytentysixty third
  • 65064:sixtyfortytentysixty fourth
  • 65661:sixtyfortysixteentysixty first
  • 65700:sixtyfortysixteentytentieth
  • 65809:sixtyfortyeighteentyty ninth
  • 65972:sixtyfortyeighteentysixteenty twelfth
  • 66000:sixtysixtytytieth
  • 69219:sixtyeightytwelftyty nineteenth
  • 69589:sixtyeightyfourteentyeighteenty ninth
  • 69627:sixtyeightysixteentytwenty seventh
  • 70172:sixtytentytysixteenty twelfth
  • 71569:sixtytentyfourteentysixteenty ninth
  • 71600:sixtytentysixteentytieth
  • 71920:sixtytentyeighteentytwelftieth
  • 72171:sixtytwelftytysixteenty eleventh
  • 72180:sixtytwelftytyeighteentieth
  • 73584:sixtytwelftyfourteentyeighteenty fourth
  • 74298:sixtyfourteentytwentyeighty eighteenth
  • 74790:sixtyfourteentysixtyeighteenty tenth
  • 75930:sixtyfourteentyeighteentytwelfty tenth
  • 78000:sixtyeighteentytytieth
  • 78007:sixtyeighteentytyty seventh
  • 79240:sixtyeighteentytwelftyfortieth
  • 79877:sixtyeighteentyeighteentysixty seventeenth
  • 80000:eightytytytieth
  • 83458:eightytwentyfourteentyforty eighteenth
  • 83900:eightytwentyeighteentytentieth
  • 84672:eightyfortysixtysixty twelfth
  • 85892:eightyfortyeighteentyeighty twelfth
  • 85991:eightyfortyeighteentyeighteenty eleventh
  • 86140:eightysixtytyfourteentieth
  • 87608:eightysixtysixteentyty eighth
  • 87861:eightysixtyeighteentysixty first
  • 87954:eightysixtyeighteentyfourteenty fourteenth
  • 88000:eightyeightytytieth
  • 88329:eightyeightytwentytwelfty ninth
  • 88484:eightyeightyfortyeighty fourth
  • 88552:eightyeightyfortyfourteenty twelfth
  • 88860:eightyeightyeightysixtieth
  • 90180:eightytentytyeighteentieth
  • 90935:eightytentyeightytwelfty fifteenth
  • 92555:eightytwelftyfortyfourteenty fifteenth
  • 93174:eightytwelftytentysixteenty fourteenth
  • 93371:eightytwelftytwelftysixteenty eleventh
  • 93610:eightytwelftysixteentyty tenth
  • 93642:eightytwelftysixteentyforty second
  • 94023:eightyfourteentytytwenty third
  • 94175:eightyfourteentytysixteenty fifteenth
  • 94576:eightyfourteentyfortysixteenty sixteenth
  • 94981:eightyfourteentyeightyeighteenty first
  • 95797:eightyfourteentysixteentyeighteenty seventeenth
  • 96134:eightysixteentytytwelfty fourteenth
  • 96826:eightysixteentyeightytwenty sixth
  • 97280:eightysixteentytwelftyeightieth
  • ```
  • ## Scoring
  • This is a [code golf challenge]. Your score is the number of bytes in your code.
  • > Explanations are optional, but I'm more likely to upvote answers that have one.
  • [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
  • Write code that takes a positive integer and outputs the awkward ordinal name from the test cases. Notice that these are not the [conventional ordinal names](https://en.wikipedia.org/wiki/Ordinal_numeral), although there is significant overlap.
  • You are free to use any approach that happens to pass all the test cases.
  • ## Input
  • - A positive integer from the test cases.
  • - You are not required to support any input not listed in the test cases.
  • ## Output
  • - The corresponding string from the test cases.
  • - This must be in the exact format shown, including having spaces in and only in the specified places.
  • ## Example
  • Given input `224`:
  • - The correct output is `twentytwenty fourth`.
  • - It is incorrect to output `twenty twenty fourth` (due to the extra space).
  • - It is incorrect to output `twentytwentyfourth` (due to the missing space).
  • ## Test cases
  • Test cases are in the format `input:output` where the input is a positive integer, and the output is made up solely of lower case letters and sometimes spaces.
  • There are 248 test cases, spread between 1, 2, 3, 4, and 5 digit inputs.
  • ```text
  • 1:first
  • 2:second
  • 3:third
  • 4:fourth
  • 5:fifth
  • 6:sixth
  • 7:seventh
  • 8:eighth
  • 9:ninth
  • 10:tenth
  • 11:eleventh
  • 12:twelfth
  • 13:thirteenth
  • 14:fourteenth
  • 15:fifteenth
  • 16:sixteenth
  • 17:seventeenth
  • 18:eighteenth
  • 19:nineteenth
  • 20:twentieth
  • 21:twenty first
  • 22:twenty second
  • 23:twenty third
  • 24:twenty fourth
  • 25:twenty fifth
  • 26:twenty sixth
  • 27:twenty seventh
  • 28:twenty eighth
  • 29:twenty ninth
  • 30:twenty tenth
  • 31:twenty eleventh
  • 32:twenty twelfth
  • 33:twenty thirteenth
  • 34:twenty fourteenth
  • 35:twenty fifteenth
  • 36:twenty sixteenth
  • 37:twenty seventeenth
  • 38:twenty eighteenth
  • 39:twenty nineteenth
  • 40:fortieth
  • 41:forty first
  • 44:forty fourth
  • 47:forty seventh
  • 50:forty tenth
  • 53:forty thirteenth
  • 56:forty sixteenth
  • 59:forty nineteenth
  • 62:sixty second
  • 65:sixty fifth
  • 68:sixty eighth
  • 71:sixty eleventh
  • 74:sixty fourteenth
  • 77:sixty seventeenth
  • 80:eightieth
  • 83:eighty third
  • 86:eighty sixth
  • 89:eighty ninth
  • 92:eighty twelfth
  • 95:eighty fifteenth
  • 98:eighty eighteenth
  • 105:tenty fifth
  • 112:tenty twelfth
  • 119:tenty nineteenth
  • 126:twelfty sixth
  • 133:twelfty thirteenth
  • 140:fourteentieth
  • 147:fourteenty seventh
  • 154:fourteenty fourteenth
  • 161:sixteenty first
  • 168:sixteenty eighth
  • 175:sixteenty fifteenth
  • 182:eighteenty second
  • 189:eighteenty ninth
  • 196:eighteenty sixteenth
  • 203:twentyty third
  • 210:twentyty tenth
  • 217:twentyty seventeenth
  • 224:twentytwenty fourth
  • 231:twentytwenty eleventh
  • 250:twentyforty tenth
  • 269:twentysixty ninth
  • 288:twentyeighty eighth
  • 307:twentytenty seventh
  • 326:twentytwelfty sixth
  • 345:twentyfourteenty fifth
  • 364:twentysixteenty fourth
  • 383:twentyeighteenty third
  • 402:fortyty second
  • 421:fortytwenty first
  • 440:fortyfortieth
  • 459:fortyforty nineteenth
  • 478:fortysixty eighteenth
  • 497:fortyeighty seventeenth
  • 516:fortytenty sixteenth
  • 535:fortytwelfty fifteenth
  • 554:fortyfourteenty fourteenth
  • 573:fortysixteenty thirteenth
  • 592:fortyeighteenty twelfth
  • 880:eightyeightieth
  • 1283:twelftyeighty third
  • 1400:fourteentytieth
  • 1617:sixteentyty seventeenth
  • 4360:fortytwentysixteentieth
  • 4895:fortyeightyeighty fifteenth
  • 6802:sixtyeightyty second
  • 6837:sixtyeightytwenty seventeenth
  • 7999:sixtyeighteentyeighteenty nineteenth
  • 8320:eightytwentytwelftieth
  • 8944:eightyeightyfourteenty fourth
  • 9274:eightytwelftysixty fourteenth
  • 9353:eightytwelftyfourteenty thirteenth
  • 10008:tentytyty eighth
  • 10045:tentytyforty fifth
  • 10405:tentyfortyty fifth
  • 10731:tentysixtytwelfty eleventh
  • 10740:tentysixtyfourteentieth
  • 11320:tentytwelftytwelftieth
  • 13206:twelftytwelftyty sixth
  • 13240:twelftytwelftyfortieth
  • 13415:twelftyfourteentyty fifteenth
  • 13471:twelftyfourteentysixty eleventh
  • 14616:fourteentysixtyty sixteenth
  • 15348:fourteentytwelftyfourteenty eighth
  • 15560:fourteentyfourteentysixteentieth
  • 16000:sixteentytytieth
  • 17333:sixteentytwelftytwelfty thirteenth
  • 18066:eighteentytysixty sixth
  • 18263:eighteentytwentysixty third
  • 18976:eighteentyeightysixteenty sixteenth
  • 20017:twentytytyty seventeenth
  • 20018:twentytytyty eighteenth
  • 20260:twentytytwentysixtieth
  • 20955:twentytyeightyfourteenty fifteenth
  • 21445:twentytyfourteentyforty fifth
  • 21553:twentytyfourteentyfourteenty thirteenth
  • 21860:twentytyeighteentysixtieth
  • 25188:twentyfortytentyeighteenty eighth
  • 25529:twentyfortyfourteentytwelfty ninth
  • 27360:twentysixtytwelftysixteentieth
  • 27772:twentysixtysixteentysixteenty twelfth
  • 28061:twentyeightytysixty first
  • 28800:twentyeightyeightytieth
  • 29220:twentyeightytwelftytwentieth
  • 29740:twentyeightysixteentyfourteentieth
  • 29950:twentyeightyeighteentyfourteenty tenth
  • 30340:twentytentytwentyfourteentieth
  • 31036:twentytentytentytwenty sixteenth
  • 31600:twentytentysixteentytieth
  • 33680:twentytwelftysixteentyeightieth
  • 33719:twentytwelftysixteentytenty nineteenth
  • 34019:twentyfourteentytyty nineteenth
  • 34341:twentyfourteentytwentyfourteenty first
  • 34526:twentyfourteentyfortytwelfty sixth
  • 34713:twentyfourteentysixtytenty thirteenth
  • 34715:twentyfourteentysixtytenty fifteenth
  • 36650:twentysixteentysixtyforty tenth
  • 37381:twentysixteentytwelftyeighteenty first
  • 37780:twentysixteentysixteentyeighteentieth
  • 38299:twentyeighteentytwentyeighty nineteenth
  • 38982:twentyeighteentyeightyeighteenty second
  • 40000:fortytytytieth
  • 40907:fortytyeightytenty seventh
  • 41849:fortytyeighteentyforty ninth
  • 42000:fortytwentytytieth
  • 42527:fortytwentyfortytwelfty seventh
  • 43356:fortytwentytwelftyfourteenty sixteenth
  • 43382:fortytwentytwelftyeighteenty second
  • 44003:fortyfortytyty third
  • 45187:fortyfortytentyeighteenty seventh
  • 45208:fortyfortytwelftyty eighth
  • 46220:fortysixtytwentytwentieth
  • 46827:fortysixtyeightytwenty seventh
  • 47436:fortysixtyfourteentytwenty sixteenth
  • 47744:fortysixtysixteentyfourteenty fourth
  • 47800:fortysixtyeighteentytieth
  • 48198:fortyeightytyeighteenty eighteenth
  • 52100:fortytwelftytytentieth
  • 54000:fortyfourteentytytieth
  • 57340:fortysixteentytwelftyfourteentieth
  • 58010:fortyeighteentytyty tenth
  • 58705:fortyeighteentysixtytenty fifth
  • 59400:fortyeighteentyfourteentytieth
  • 59713:fortyeighteentysixteentytenty thirteenth
  • 60000:sixtytytytieth
  • 60019:sixtytytyty nineteenth
  • 60189:sixtytytyeighteenty ninth
  • 60941:sixtytyeightyfourteenty first
  • 62220:sixtytwentytwentytwentieth
  • 62314:sixtytwentytwentytenty fourteenth
  • 62754:sixtytwentysixtyfourteenty fourteenth
  • 63540:sixtytwentyfourteentyfourteentieth
  • 63965:sixtytwentyeighteentysixteenty fifth
  • 64040:sixtyfortytyfortieth
  • 64943:sixtyfortyeightyfourteenty third
  • 65063:sixtyfortytentysixty third
  • 65064:sixtyfortytentysixty fourth
  • 65661:sixtyfortysixteentysixty first
  • 65700:sixtyfortysixteentytentieth
  • 65809:sixtyfortyeighteentyty ninth
  • 65972:sixtyfortyeighteentysixteenty twelfth
  • 66000:sixtysixtytytieth
  • 69219:sixtyeightytwelftyty nineteenth
  • 69589:sixtyeightyfourteentyeighteenty ninth
  • 69627:sixtyeightysixteentytwenty seventh
  • 70172:sixtytentytysixteenty twelfth
  • 71569:sixtytentyfourteentysixteenty ninth
  • 71600:sixtytentysixteentytieth
  • 71920:sixtytentyeighteentytwelftieth
  • 72171:sixtytwelftytysixteenty eleventh
  • 72180:sixtytwelftytyeighteentieth
  • 73584:sixtytwelftyfourteentyeighteenty fourth
  • 74298:sixtyfourteentytwentyeighty eighteenth
  • 74790:sixtyfourteentysixtyeighteenty tenth
  • 75930:sixtyfourteentyeighteentytwelfty tenth
  • 78000:sixtyeighteentytytieth
  • 78007:sixtyeighteentytyty seventh
  • 79240:sixtyeighteentytwelftyfortieth
  • 79877:sixtyeighteentyeighteentysixty seventeenth
  • 80000:eightytytytieth
  • 83458:eightytwentyfourteentyforty eighteenth
  • 83900:eightytwentyeighteentytentieth
  • 84672:eightyfortysixtysixty twelfth
  • 85892:eightyfortyeighteentyeighty twelfth
  • 85991:eightyfortyeighteentyeighteenty eleventh
  • 86140:eightysixtytyfourteentieth
  • 87608:eightysixtysixteentyty eighth
  • 87861:eightysixtyeighteentysixty first
  • 87954:eightysixtyeighteentyfourteenty fourteenth
  • 88000:eightyeightytytieth
  • 88329:eightyeightytwentytwelfty ninth
  • 88484:eightyeightyfortyeighty fourth
  • 88552:eightyeightyfortyfourteenty twelfth
  • 88860:eightyeightyeightysixtieth
  • 90180:eightytentytyeighteentieth
  • 90935:eightytentyeightytwelfty fifteenth
  • 92555:eightytwelftyfortyfourteenty fifteenth
  • 93174:eightytwelftytentysixteenty fourteenth
  • 93371:eightytwelftytwelftysixteenty eleventh
  • 93610:eightytwelftysixteentyty tenth
  • 93642:eightytwelftysixteentyforty second
  • 94023:eightyfourteentytytwenty third
  • 94175:eightyfourteentytysixteenty fifteenth
  • 94576:eightyfourteentyfortysixteenty sixteenth
  • 94981:eightyfourteentyeightyeighteenty first
  • 95797:eightyfourteentysixteentyeighteenty seventeenth
  • 96134:eightysixteentytytwelfty fourteenth
  • 96826:eightysixteentyeightytwenty sixth
  • 97280:eightysixteentytwelftyeightieth
  • ```
  • ## Scoring
  • This is a [code golf challenge]. Your score is the number of bytes in your code.
  • > Explanations are optional, but I'm more likely to upvote answers that have one.
  • [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#5: Post edited by user avatar trichoplax‭ · 2025-04-18T23:11:43Z (3 days ago)
Remove redundant backstory
  • In the fortieth century, matharchaeologists tried to reconstruct the [ordinal names for numbers](https://en.wikipedia.org/wiki/Ordinal_numeral) used in the twentieth century. Their results were not entirely accurate.
  • Write code that takes a positive integer and outputs the reconstructed ordinal name from the test cases.
  • ## Explanation
  • I considered including an algorithm in the challenge specification, but instead decided on just providing test cases and leaving this initially as an exercise in matharchaeology. If no correct answers arrive I will eventually post an answer of my own as an explanatory example, so feel free to wait until then if digging around in the data doesn’t appeal.
  • You are also free to use any approach that happens to pass all the test cases.
  • ## Input
  • - A positive integer from the test cases.
  • - You are not required to support any input not listed in the test cases. For these your code may do anything, including crash.
  • ## Output
  • - The corresponding string from the test cases.
  • - This must be in the exact format shown, including having spaces in and only in the specified places.
  • ## Example
  • Given input `224`:
  • - The correct output is `twentytwenty fourth`.
  • - It is incorrect to output `twenty twenty fourth` (due to the extra space).
  • - It is incorrect to output `twentytwentyfourth` (due to the missing space).
  • ## Test cases
  • Test cases are in the format `input:output` where the input is a positive integer, and the output is made up solely of lower case letters and sometimes spaces.
  • There are 248 test cases, spread between 1, 2, 3, 4, and 5 digit inputs.
  • ```text
  • 1:first
  • 2:second
  • 3:third
  • 4:fourth
  • 5:fifth
  • 6:sixth
  • 7:seventh
  • 8:eighth
  • 9:ninth
  • 10:tenth
  • 11:eleventh
  • 12:twelfth
  • 13:thirteenth
  • 14:fourteenth
  • 15:fifteenth
  • 16:sixteenth
  • 17:seventeenth
  • 18:eighteenth
  • 19:nineteenth
  • 20:twentieth
  • 21:twenty first
  • 22:twenty second
  • 23:twenty third
  • 24:twenty fourth
  • 25:twenty fifth
  • 26:twenty sixth
  • 27:twenty seventh
  • 28:twenty eighth
  • 29:twenty ninth
  • 30:twenty tenth
  • 31:twenty eleventh
  • 32:twenty twelfth
  • 33:twenty thirteenth
  • 34:twenty fourteenth
  • 35:twenty fifteenth
  • 36:twenty sixteenth
  • 37:twenty seventeenth
  • 38:twenty eighteenth
  • 39:twenty nineteenth
  • 40:fortieth
  • 41:forty first
  • 44:forty fourth
  • 47:forty seventh
  • 50:forty tenth
  • 53:forty thirteenth
  • 56:forty sixteenth
  • 59:forty nineteenth
  • 62:sixty second
  • 65:sixty fifth
  • 68:sixty eighth
  • 71:sixty eleventh
  • 74:sixty fourteenth
  • 77:sixty seventeenth
  • 80:eightieth
  • 83:eighty third
  • 86:eighty sixth
  • 89:eighty ninth
  • 92:eighty twelfth
  • 95:eighty fifteenth
  • 98:eighty eighteenth
  • 105:tenty fifth
  • 112:tenty twelfth
  • 119:tenty nineteenth
  • 126:twelfty sixth
  • 133:twelfty thirteenth
  • 140:fourteentieth
  • 147:fourteenty seventh
  • 154:fourteenty fourteenth
  • 161:sixteenty first
  • 168:sixteenty eighth
  • 175:sixteenty fifteenth
  • 182:eighteenty second
  • 189:eighteenty ninth
  • 196:eighteenty sixteenth
  • 203:twentyty third
  • 210:twentyty tenth
  • 217:twentyty seventeenth
  • 224:twentytwenty fourth
  • 231:twentytwenty eleventh
  • 250:twentyforty tenth
  • 269:twentysixty ninth
  • 288:twentyeighty eighth
  • 307:twentytenty seventh
  • 326:twentytwelfty sixth
  • 345:twentyfourteenty fifth
  • 364:twentysixteenty fourth
  • 383:twentyeighteenty third
  • 402:fortyty second
  • 421:fortytwenty first
  • 440:fortyfortieth
  • 459:fortyforty nineteenth
  • 478:fortysixty eighteenth
  • 497:fortyeighty seventeenth
  • 516:fortytenty sixteenth
  • 535:fortytwelfty fifteenth
  • 554:fortyfourteenty fourteenth
  • 573:fortysixteenty thirteenth
  • 592:fortyeighteenty twelfth
  • 880:eightyeightieth
  • 1283:twelftyeighty third
  • 1400:fourteentytieth
  • 1617:sixteentyty seventeenth
  • 4360:fortytwentysixteentieth
  • 4895:fortyeightyeighty fifteenth
  • 6802:sixtyeightyty second
  • 6837:sixtyeightytwenty seventeenth
  • 7999:sixtyeighteentyeighteenty nineteenth
  • 8320:eightytwentytwelftieth
  • 8944:eightyeightyfourteenty fourth
  • 9274:eightytwelftysixty fourteenth
  • 9353:eightytwelftyfourteenty thirteenth
  • 10008:tentytyty eighth
  • 10045:tentytyforty fifth
  • 10405:tentyfortyty fifth
  • 10731:tentysixtytwelfty eleventh
  • 10740:tentysixtyfourteentieth
  • 11320:tentytwelftytwelftieth
  • 13206:twelftytwelftyty sixth
  • 13240:twelftytwelftyfortieth
  • 13415:twelftyfourteentyty fifteenth
  • 13471:twelftyfourteentysixty eleventh
  • 14616:fourteentysixtyty sixteenth
  • 15348:fourteentytwelftyfourteenty eighth
  • 15560:fourteentyfourteentysixteentieth
  • 16000:sixteentytytieth
  • 17333:sixteentytwelftytwelfty thirteenth
  • 18066:eighteentytysixty sixth
  • 18263:eighteentytwentysixty third
  • 18976:eighteentyeightysixteenty sixteenth
  • 20017:twentytytyty seventeenth
  • 20018:twentytytyty eighteenth
  • 20260:twentytytwentysixtieth
  • 20955:twentytyeightyfourteenty fifteenth
  • 21445:twentytyfourteentyforty fifth
  • 21553:twentytyfourteentyfourteenty thirteenth
  • 21860:twentytyeighteentysixtieth
  • 25188:twentyfortytentyeighteenty eighth
  • 25529:twentyfortyfourteentytwelfty ninth
  • 27360:twentysixtytwelftysixteentieth
  • 27772:twentysixtysixteentysixteenty twelfth
  • 28061:twentyeightytysixty first
  • 28800:twentyeightyeightytieth
  • 29220:twentyeightytwelftytwentieth
  • 29740:twentyeightysixteentyfourteentieth
  • 29950:twentyeightyeighteentyfourteenty tenth
  • 30340:twentytentytwentyfourteentieth
  • 31036:twentytentytentytwenty sixteenth
  • 31600:twentytentysixteentytieth
  • 33680:twentytwelftysixteentyeightieth
  • 33719:twentytwelftysixteentytenty nineteenth
  • 34019:twentyfourteentytyty nineteenth
  • 34341:twentyfourteentytwentyfourteenty first
  • 34526:twentyfourteentyfortytwelfty sixth
  • 34713:twentyfourteentysixtytenty thirteenth
  • 34715:twentyfourteentysixtytenty fifteenth
  • 36650:twentysixteentysixtyforty tenth
  • 37381:twentysixteentytwelftyeighteenty first
  • 37780:twentysixteentysixteentyeighteentieth
  • 38299:twentyeighteentytwentyeighty nineteenth
  • 38982:twentyeighteentyeightyeighteenty second
  • 40000:fortytytytieth
  • 40907:fortytyeightytenty seventh
  • 41849:fortytyeighteentyforty ninth
  • 42000:fortytwentytytieth
  • 42527:fortytwentyfortytwelfty seventh
  • 43356:fortytwentytwelftyfourteenty sixteenth
  • 43382:fortytwentytwelftyeighteenty second
  • 44003:fortyfortytyty third
  • 45187:fortyfortytentyeighteenty seventh
  • 45208:fortyfortytwelftyty eighth
  • 46220:fortysixtytwentytwentieth
  • 46827:fortysixtyeightytwenty seventh
  • 47436:fortysixtyfourteentytwenty sixteenth
  • 47744:fortysixtysixteentyfourteenty fourth
  • 47800:fortysixtyeighteentytieth
  • 48198:fortyeightytyeighteenty eighteenth
  • 52100:fortytwelftytytentieth
  • 54000:fortyfourteentytytieth
  • 57340:fortysixteentytwelftyfourteentieth
  • 58010:fortyeighteentytyty tenth
  • 58705:fortyeighteentysixtytenty fifth
  • 59400:fortyeighteentyfourteentytieth
  • 59713:fortyeighteentysixteentytenty thirteenth
  • 60000:sixtytytytieth
  • 60019:sixtytytyty nineteenth
  • 60189:sixtytytyeighteenty ninth
  • 60941:sixtytyeightyfourteenty first
  • 62220:sixtytwentytwentytwentieth
  • 62314:sixtytwentytwentytenty fourteenth
  • 62754:sixtytwentysixtyfourteenty fourteenth
  • 63540:sixtytwentyfourteentyfourteentieth
  • 63965:sixtytwentyeighteentysixteenty fifth
  • 64040:sixtyfortytyfortieth
  • 64943:sixtyfortyeightyfourteenty third
  • 65063:sixtyfortytentysixty third
  • 65064:sixtyfortytentysixty fourth
  • 65661:sixtyfortysixteentysixty first
  • 65700:sixtyfortysixteentytentieth
  • 65809:sixtyfortyeighteentyty ninth
  • 65972:sixtyfortyeighteentysixteenty twelfth
  • 66000:sixtysixtytytieth
  • 69219:sixtyeightytwelftyty nineteenth
  • 69589:sixtyeightyfourteentyeighteenty ninth
  • 69627:sixtyeightysixteentytwenty seventh
  • 70172:sixtytentytysixteenty twelfth
  • 71569:sixtytentyfourteentysixteenty ninth
  • 71600:sixtytentysixteentytieth
  • 71920:sixtytentyeighteentytwelftieth
  • 72171:sixtytwelftytysixteenty eleventh
  • 72180:sixtytwelftytyeighteentieth
  • 73584:sixtytwelftyfourteentyeighteenty fourth
  • 74298:sixtyfourteentytwentyeighty eighteenth
  • 74790:sixtyfourteentysixtyeighteenty tenth
  • 75930:sixtyfourteentyeighteentytwelfty tenth
  • 78000:sixtyeighteentytytieth
  • 78007:sixtyeighteentytyty seventh
  • 79240:sixtyeighteentytwelftyfortieth
  • 79877:sixtyeighteentyeighteentysixty seventeenth
  • 80000:eightytytytieth
  • 83458:eightytwentyfourteentyforty eighteenth
  • 83900:eightytwentyeighteentytentieth
  • 84672:eightyfortysixtysixty twelfth
  • 85892:eightyfortyeighteentyeighty twelfth
  • 85991:eightyfortyeighteentyeighteenty eleventh
  • 86140:eightysixtytyfourteentieth
  • 87608:eightysixtysixteentyty eighth
  • 87861:eightysixtyeighteentysixty first
  • 87954:eightysixtyeighteentyfourteenty fourteenth
  • 88000:eightyeightytytieth
  • 88329:eightyeightytwentytwelfty ninth
  • 88484:eightyeightyfortyeighty fourth
  • 88552:eightyeightyfortyfourteenty twelfth
  • 88860:eightyeightyeightysixtieth
  • 90180:eightytentytyeighteentieth
  • 90935:eightytentyeightytwelfty fifteenth
  • 92555:eightytwelftyfortyfourteenty fifteenth
  • 93174:eightytwelftytentysixteenty fourteenth
  • 93371:eightytwelftytwelftysixteenty eleventh
  • 93610:eightytwelftysixteentyty tenth
  • 93642:eightytwelftysixteentyforty second
  • 94023:eightyfourteentytytwenty third
  • 94175:eightyfourteentytysixteenty fifteenth
  • 94576:eightyfourteentyfortysixteenty sixteenth
  • 94981:eightyfourteentyeightyeighteenty first
  • 95797:eightyfourteentysixteentyeighteenty seventeenth
  • 96134:eightysixteentytytwelfty fourteenth
  • 96826:eightysixteentyeightytwenty sixth
  • 97280:eightysixteentytwelftyeightieth
  • ```
  • ## Scoring
  • This is a [code golf challenge]. Your score is the number of bytes in your code.
  • > Explanations are optional, but I'm more likely to upvote answers that have one.
  • [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
  • Write code that takes a positive integer and outputs the awkward ordinal name from the test cases. Notice that these are not the [conventional ordinal names](https://en.wikipedia.org/wiki/Ordinal_numeral), although there is significant overlap.
  • ## Explanation
  • I considered including an algorithm in the challenge specification, but instead decided to just provide test cases. If no correct answers arrive I will eventually post an answer of my own as an explanatory example, so feel free to wait until then if working from test cases doesn’t appeal.
  • You are also free to use any approach that happens to pass all the test cases.
  • ## Input
  • - A positive integer from the test cases.
  • - You are not required to support any input not listed in the test cases.
  • ## Output
  • - The corresponding string from the test cases.
  • - This must be in the exact format shown, including having spaces in and only in the specified places.
  • ## Example
  • Given input `224`:
  • - The correct output is `twentytwenty fourth`.
  • - It is incorrect to output `twenty twenty fourth` (due to the extra space).
  • - It is incorrect to output `twentytwentyfourth` (due to the missing space).
  • ## Test cases
  • Test cases are in the format `input:output` where the input is a positive integer, and the output is made up solely of lower case letters and sometimes spaces.
  • There are 248 test cases, spread between 1, 2, 3, 4, and 5 digit inputs.
  • ```text
  • 1:first
  • 2:second
  • 3:third
  • 4:fourth
  • 5:fifth
  • 6:sixth
  • 7:seventh
  • 8:eighth
  • 9:ninth
  • 10:tenth
  • 11:eleventh
  • 12:twelfth
  • 13:thirteenth
  • 14:fourteenth
  • 15:fifteenth
  • 16:sixteenth
  • 17:seventeenth
  • 18:eighteenth
  • 19:nineteenth
  • 20:twentieth
  • 21:twenty first
  • 22:twenty second
  • 23:twenty third
  • 24:twenty fourth
  • 25:twenty fifth
  • 26:twenty sixth
  • 27:twenty seventh
  • 28:twenty eighth
  • 29:twenty ninth
  • 30:twenty tenth
  • 31:twenty eleventh
  • 32:twenty twelfth
  • 33:twenty thirteenth
  • 34:twenty fourteenth
  • 35:twenty fifteenth
  • 36:twenty sixteenth
  • 37:twenty seventeenth
  • 38:twenty eighteenth
  • 39:twenty nineteenth
  • 40:fortieth
  • 41:forty first
  • 44:forty fourth
  • 47:forty seventh
  • 50:forty tenth
  • 53:forty thirteenth
  • 56:forty sixteenth
  • 59:forty nineteenth
  • 62:sixty second
  • 65:sixty fifth
  • 68:sixty eighth
  • 71:sixty eleventh
  • 74:sixty fourteenth
  • 77:sixty seventeenth
  • 80:eightieth
  • 83:eighty third
  • 86:eighty sixth
  • 89:eighty ninth
  • 92:eighty twelfth
  • 95:eighty fifteenth
  • 98:eighty eighteenth
  • 105:tenty fifth
  • 112:tenty twelfth
  • 119:tenty nineteenth
  • 126:twelfty sixth
  • 133:twelfty thirteenth
  • 140:fourteentieth
  • 147:fourteenty seventh
  • 154:fourteenty fourteenth
  • 161:sixteenty first
  • 168:sixteenty eighth
  • 175:sixteenty fifteenth
  • 182:eighteenty second
  • 189:eighteenty ninth
  • 196:eighteenty sixteenth
  • 203:twentyty third
  • 210:twentyty tenth
  • 217:twentyty seventeenth
  • 224:twentytwenty fourth
  • 231:twentytwenty eleventh
  • 250:twentyforty tenth
  • 269:twentysixty ninth
  • 288:twentyeighty eighth
  • 307:twentytenty seventh
  • 326:twentytwelfty sixth
  • 345:twentyfourteenty fifth
  • 364:twentysixteenty fourth
  • 383:twentyeighteenty third
  • 402:fortyty second
  • 421:fortytwenty first
  • 440:fortyfortieth
  • 459:fortyforty nineteenth
  • 478:fortysixty eighteenth
  • 497:fortyeighty seventeenth
  • 516:fortytenty sixteenth
  • 535:fortytwelfty fifteenth
  • 554:fortyfourteenty fourteenth
  • 573:fortysixteenty thirteenth
  • 592:fortyeighteenty twelfth
  • 880:eightyeightieth
  • 1283:twelftyeighty third
  • 1400:fourteentytieth
  • 1617:sixteentyty seventeenth
  • 4360:fortytwentysixteentieth
  • 4895:fortyeightyeighty fifteenth
  • 6802:sixtyeightyty second
  • 6837:sixtyeightytwenty seventeenth
  • 7999:sixtyeighteentyeighteenty nineteenth
  • 8320:eightytwentytwelftieth
  • 8944:eightyeightyfourteenty fourth
  • 9274:eightytwelftysixty fourteenth
  • 9353:eightytwelftyfourteenty thirteenth
  • 10008:tentytyty eighth
  • 10045:tentytyforty fifth
  • 10405:tentyfortyty fifth
  • 10731:tentysixtytwelfty eleventh
  • 10740:tentysixtyfourteentieth
  • 11320:tentytwelftytwelftieth
  • 13206:twelftytwelftyty sixth
  • 13240:twelftytwelftyfortieth
  • 13415:twelftyfourteentyty fifteenth
  • 13471:twelftyfourteentysixty eleventh
  • 14616:fourteentysixtyty sixteenth
  • 15348:fourteentytwelftyfourteenty eighth
  • 15560:fourteentyfourteentysixteentieth
  • 16000:sixteentytytieth
  • 17333:sixteentytwelftytwelfty thirteenth
  • 18066:eighteentytysixty sixth
  • 18263:eighteentytwentysixty third
  • 18976:eighteentyeightysixteenty sixteenth
  • 20017:twentytytyty seventeenth
  • 20018:twentytytyty eighteenth
  • 20260:twentytytwentysixtieth
  • 20955:twentytyeightyfourteenty fifteenth
  • 21445:twentytyfourteentyforty fifth
  • 21553:twentytyfourteentyfourteenty thirteenth
  • 21860:twentytyeighteentysixtieth
  • 25188:twentyfortytentyeighteenty eighth
  • 25529:twentyfortyfourteentytwelfty ninth
  • 27360:twentysixtytwelftysixteentieth
  • 27772:twentysixtysixteentysixteenty twelfth
  • 28061:twentyeightytysixty first
  • 28800:twentyeightyeightytieth
  • 29220:twentyeightytwelftytwentieth
  • 29740:twentyeightysixteentyfourteentieth
  • 29950:twentyeightyeighteentyfourteenty tenth
  • 30340:twentytentytwentyfourteentieth
  • 31036:twentytentytentytwenty sixteenth
  • 31600:twentytentysixteentytieth
  • 33680:twentytwelftysixteentyeightieth
  • 33719:twentytwelftysixteentytenty nineteenth
  • 34019:twentyfourteentytyty nineteenth
  • 34341:twentyfourteentytwentyfourteenty first
  • 34526:twentyfourteentyfortytwelfty sixth
  • 34713:twentyfourteentysixtytenty thirteenth
  • 34715:twentyfourteentysixtytenty fifteenth
  • 36650:twentysixteentysixtyforty tenth
  • 37381:twentysixteentytwelftyeighteenty first
  • 37780:twentysixteentysixteentyeighteentieth
  • 38299:twentyeighteentytwentyeighty nineteenth
  • 38982:twentyeighteentyeightyeighteenty second
  • 40000:fortytytytieth
  • 40907:fortytyeightytenty seventh
  • 41849:fortytyeighteentyforty ninth
  • 42000:fortytwentytytieth
  • 42527:fortytwentyfortytwelfty seventh
  • 43356:fortytwentytwelftyfourteenty sixteenth
  • 43382:fortytwentytwelftyeighteenty second
  • 44003:fortyfortytyty third
  • 45187:fortyfortytentyeighteenty seventh
  • 45208:fortyfortytwelftyty eighth
  • 46220:fortysixtytwentytwentieth
  • 46827:fortysixtyeightytwenty seventh
  • 47436:fortysixtyfourteentytwenty sixteenth
  • 47744:fortysixtysixteentyfourteenty fourth
  • 47800:fortysixtyeighteentytieth
  • 48198:fortyeightytyeighteenty eighteenth
  • 52100:fortytwelftytytentieth
  • 54000:fortyfourteentytytieth
  • 57340:fortysixteentytwelftyfourteentieth
  • 58010:fortyeighteentytyty tenth
  • 58705:fortyeighteentysixtytenty fifth
  • 59400:fortyeighteentyfourteentytieth
  • 59713:fortyeighteentysixteentytenty thirteenth
  • 60000:sixtytytytieth
  • 60019:sixtytytyty nineteenth
  • 60189:sixtytytyeighteenty ninth
  • 60941:sixtytyeightyfourteenty first
  • 62220:sixtytwentytwentytwentieth
  • 62314:sixtytwentytwentytenty fourteenth
  • 62754:sixtytwentysixtyfourteenty fourteenth
  • 63540:sixtytwentyfourteentyfourteentieth
  • 63965:sixtytwentyeighteentysixteenty fifth
  • 64040:sixtyfortytyfortieth
  • 64943:sixtyfortyeightyfourteenty third
  • 65063:sixtyfortytentysixty third
  • 65064:sixtyfortytentysixty fourth
  • 65661:sixtyfortysixteentysixty first
  • 65700:sixtyfortysixteentytentieth
  • 65809:sixtyfortyeighteentyty ninth
  • 65972:sixtyfortyeighteentysixteenty twelfth
  • 66000:sixtysixtytytieth
  • 69219:sixtyeightytwelftyty nineteenth
  • 69589:sixtyeightyfourteentyeighteenty ninth
  • 69627:sixtyeightysixteentytwenty seventh
  • 70172:sixtytentytysixteenty twelfth
  • 71569:sixtytentyfourteentysixteenty ninth
  • 71600:sixtytentysixteentytieth
  • 71920:sixtytentyeighteentytwelftieth
  • 72171:sixtytwelftytysixteenty eleventh
  • 72180:sixtytwelftytyeighteentieth
  • 73584:sixtytwelftyfourteentyeighteenty fourth
  • 74298:sixtyfourteentytwentyeighty eighteenth
  • 74790:sixtyfourteentysixtyeighteenty tenth
  • 75930:sixtyfourteentyeighteentytwelfty tenth
  • 78000:sixtyeighteentytytieth
  • 78007:sixtyeighteentytyty seventh
  • 79240:sixtyeighteentytwelftyfortieth
  • 79877:sixtyeighteentyeighteentysixty seventeenth
  • 80000:eightytytytieth
  • 83458:eightytwentyfourteentyforty eighteenth
  • 83900:eightytwentyeighteentytentieth
  • 84672:eightyfortysixtysixty twelfth
  • 85892:eightyfortyeighteentyeighty twelfth
  • 85991:eightyfortyeighteentyeighteenty eleventh
  • 86140:eightysixtytyfourteentieth
  • 87608:eightysixtysixteentyty eighth
  • 87861:eightysixtyeighteentysixty first
  • 87954:eightysixtyeighteentyfourteenty fourteenth
  • 88000:eightyeightytytieth
  • 88329:eightyeightytwentytwelfty ninth
  • 88484:eightyeightyfortyeighty fourth
  • 88552:eightyeightyfortyfourteenty twelfth
  • 88860:eightyeightyeightysixtieth
  • 90180:eightytentytyeighteentieth
  • 90935:eightytentyeightytwelfty fifteenth
  • 92555:eightytwelftyfortyfourteenty fifteenth
  • 93174:eightytwelftytentysixteenty fourteenth
  • 93371:eightytwelftytwelftysixteenty eleventh
  • 93610:eightytwelftysixteentyty tenth
  • 93642:eightytwelftysixteentyforty second
  • 94023:eightyfourteentytytwenty third
  • 94175:eightyfourteentytysixteenty fifteenth
  • 94576:eightyfourteentyfortysixteenty sixteenth
  • 94981:eightyfourteentyeightyeighteenty first
  • 95797:eightyfourteentysixteentyeighteenty seventeenth
  • 96134:eightysixteentytytwelfty fourteenth
  • 96826:eightysixteentyeightytwenty sixth
  • 97280:eightysixteentytwelftyeightieth
  • ```
  • ## Scoring
  • This is a [code golf challenge]. Your score is the number of bytes in your code.
  • > Explanations are optional, but I'm more likely to upvote answers that have one.
  • [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#4: Post edited by user avatar trichoplax‭ · 2025-04-18T22:48:48Z (3 days ago)
Clarify wordings
  • In the fortieth century, matharchaeologists tried to reconstruct the [ordinal names for numbers](https://en.wikipedia.org/wiki/Ordinal_numeral) used in the twentieth century. They didn’t get all of them exactly correct, but they were close. Kind of.
  • Write code that takes a positive integer and outputs the reconstructed ordinal name.
  • ## Explanation
  • I considered including an algorithm in the challenge specification, but instead decided on just providing test cases and leaving this initially as an exercise in matharchaeology. If no correct answers arrive I will eventually post an answer of my own as an explanatory example, so feel free to wait until then if digging around in the data doesn’t appeal.
  • ## Input
  • - A positive integer from the test cases.
  • - You are not required to support any number not listed in the test cases. For these your code may do anything, including crash.
  • ## Output
  • - The corresponding string from the test cases.
  • - This must be in the exact format shown, including having spaces in and only in the specified places.
  • ## Example
  • Given input `224`:
  • - The correct output is `twentytwenty fourth`.
  • - It is incorrect to output `twenty twenty fourth` (due to the extra space).
  • - It is incorrect to output `twentytwentyfourth` (due to the missing space).
  • ## Test cases
  • Test cases are in the format `input:output` where the input is a positive integer, and the output is made up solely of lower case letters and sometimes spaces.
  • There are 248 test cases, spread between 1, 2, 3, 4, and 5 digit inputs.
  • ```text
  • 1:first
  • 2:second
  • 3:third
  • 4:fourth
  • 5:fifth
  • 6:sixth
  • 7:seventh
  • 8:eighth
  • 9:ninth
  • 10:tenth
  • 11:eleventh
  • 12:twelfth
  • 13:thirteenth
  • 14:fourteenth
  • 15:fifteenth
  • 16:sixteenth
  • 17:seventeenth
  • 18:eighteenth
  • 19:nineteenth
  • 20:twentieth
  • 21:twenty first
  • 22:twenty second
  • 23:twenty third
  • 24:twenty fourth
  • 25:twenty fifth
  • 26:twenty sixth
  • 27:twenty seventh
  • 28:twenty eighth
  • 29:twenty ninth
  • 30:twenty tenth
  • 31:twenty eleventh
  • 32:twenty twelfth
  • 33:twenty thirteenth
  • 34:twenty fourteenth
  • 35:twenty fifteenth
  • 36:twenty sixteenth
  • 37:twenty seventeenth
  • 38:twenty eighteenth
  • 39:twenty nineteenth
  • 40:fortieth
  • 41:forty first
  • 44:forty fourth
  • 47:forty seventh
  • 50:forty tenth
  • 53:forty thirteenth
  • 56:forty sixteenth
  • 59:forty nineteenth
  • 62:sixty second
  • 65:sixty fifth
  • 68:sixty eighth
  • 71:sixty eleventh
  • 74:sixty fourteenth
  • 77:sixty seventeenth
  • 80:eightieth
  • 83:eighty third
  • 86:eighty sixth
  • 89:eighty ninth
  • 92:eighty twelfth
  • 95:eighty fifteenth
  • 98:eighty eighteenth
  • 105:tenty fifth
  • 112:tenty twelfth
  • 119:tenty nineteenth
  • 126:twelfty sixth
  • 133:twelfty thirteenth
  • 140:fourteentieth
  • 147:fourteenty seventh
  • 154:fourteenty fourteenth
  • 161:sixteenty first
  • 168:sixteenty eighth
  • 175:sixteenty fifteenth
  • 182:eighteenty second
  • 189:eighteenty ninth
  • 196:eighteenty sixteenth
  • 203:twentyty third
  • 210:twentyty tenth
  • 217:twentyty seventeenth
  • 224:twentytwenty fourth
  • 231:twentytwenty eleventh
  • 250:twentyforty tenth
  • 269:twentysixty ninth
  • 288:twentyeighty eighth
  • 307:twentytenty seventh
  • 326:twentytwelfty sixth
  • 345:twentyfourteenty fifth
  • 364:twentysixteenty fourth
  • 383:twentyeighteenty third
  • 402:fortyty second
  • 421:fortytwenty first
  • 440:fortyfortieth
  • 459:fortyforty nineteenth
  • 478:fortysixty eighteenth
  • 497:fortyeighty seventeenth
  • 516:fortytenty sixteenth
  • 535:fortytwelfty fifteenth
  • 554:fortyfourteenty fourteenth
  • 573:fortysixteenty thirteenth
  • 592:fortyeighteenty twelfth
  • 880:eightyeightieth
  • 1283:twelftyeighty third
  • 1400:fourteentytieth
  • 1617:sixteentyty seventeenth
  • 4360:fortytwentysixteentieth
  • 4895:fortyeightyeighty fifteenth
  • 6802:sixtyeightyty second
  • 6837:sixtyeightytwenty seventeenth
  • 7999:sixtyeighteentyeighteenty nineteenth
  • 8320:eightytwentytwelftieth
  • 8944:eightyeightyfourteenty fourth
  • 9274:eightytwelftysixty fourteenth
  • 9353:eightytwelftyfourteenty thirteenth
  • 10008:tentytyty eighth
  • 10045:tentytyforty fifth
  • 10405:tentyfortyty fifth
  • 10731:tentysixtytwelfty eleventh
  • 10740:tentysixtyfourteentieth
  • 11320:tentytwelftytwelftieth
  • 13206:twelftytwelftyty sixth
  • 13240:twelftytwelftyfortieth
  • 13415:twelftyfourteentyty fifteenth
  • 13471:twelftyfourteentysixty eleventh
  • 14616:fourteentysixtyty sixteenth
  • 15348:fourteentytwelftyfourteenty eighth
  • 15560:fourteentyfourteentysixteentieth
  • 16000:sixteentytytieth
  • 17333:sixteentytwelftytwelfty thirteenth
  • 18066:eighteentytysixty sixth
  • 18263:eighteentytwentysixty third
  • 18976:eighteentyeightysixteenty sixteenth
  • 20017:twentytytyty seventeenth
  • 20018:twentytytyty eighteenth
  • 20260:twentytytwentysixtieth
  • 20955:twentytyeightyfourteenty fifteenth
  • 21445:twentytyfourteentyforty fifth
  • 21553:twentytyfourteentyfourteenty thirteenth
  • 21860:twentytyeighteentysixtieth
  • 25188:twentyfortytentyeighteenty eighth
  • 25529:twentyfortyfourteentytwelfty ninth
  • 27360:twentysixtytwelftysixteentieth
  • 27772:twentysixtysixteentysixteenty twelfth
  • 28061:twentyeightytysixty first
  • 28800:twentyeightyeightytieth
  • 29220:twentyeightytwelftytwentieth
  • 29740:twentyeightysixteentyfourteentieth
  • 29950:twentyeightyeighteentyfourteenty tenth
  • 30340:twentytentytwentyfourteentieth
  • 31036:twentytentytentytwenty sixteenth
  • 31600:twentytentysixteentytieth
  • 33680:twentytwelftysixteentyeightieth
  • 33719:twentytwelftysixteentytenty nineteenth
  • 34019:twentyfourteentytyty nineteenth
  • 34341:twentyfourteentytwentyfourteenty first
  • 34526:twentyfourteentyfortytwelfty sixth
  • 34713:twentyfourteentysixtytenty thirteenth
  • 34715:twentyfourteentysixtytenty fifteenth
  • 36650:twentysixteentysixtyforty tenth
  • 37381:twentysixteentytwelftyeighteenty first
  • 37780:twentysixteentysixteentyeighteentieth
  • 38299:twentyeighteentytwentyeighty nineteenth
  • 38982:twentyeighteentyeightyeighteenty second
  • 40000:fortytytytieth
  • 40907:fortytyeightytenty seventh
  • 41849:fortytyeighteentyforty ninth
  • 42000:fortytwentytytieth
  • 42527:fortytwentyfortytwelfty seventh
  • 43356:fortytwentytwelftyfourteenty sixteenth
  • 43382:fortytwentytwelftyeighteenty second
  • 44003:fortyfortytyty third
  • 45187:fortyfortytentyeighteenty seventh
  • 45208:fortyfortytwelftyty eighth
  • 46220:fortysixtytwentytwentieth
  • 46827:fortysixtyeightytwenty seventh
  • 47436:fortysixtyfourteentytwenty sixteenth
  • 47744:fortysixtysixteentyfourteenty fourth
  • 47800:fortysixtyeighteentytieth
  • 48198:fortyeightytyeighteenty eighteenth
  • 52100:fortytwelftytytentieth
  • 54000:fortyfourteentytytieth
  • 57340:fortysixteentytwelftyfourteentieth
  • 58010:fortyeighteentytyty tenth
  • 58705:fortyeighteentysixtytenty fifth
  • 59400:fortyeighteentyfourteentytieth
  • 59713:fortyeighteentysixteentytenty thirteenth
  • 60000:sixtytytytieth
  • 60019:sixtytytyty nineteenth
  • 60189:sixtytytyeighteenty ninth
  • 60941:sixtytyeightyfourteenty first
  • 62220:sixtytwentytwentytwentieth
  • 62314:sixtytwentytwentytenty fourteenth
  • 62754:sixtytwentysixtyfourteenty fourteenth
  • 63540:sixtytwentyfourteentyfourteentieth
  • 63965:sixtytwentyeighteentysixteenty fifth
  • 64040:sixtyfortytyfortieth
  • 64943:sixtyfortyeightyfourteenty third
  • 65063:sixtyfortytentysixty third
  • 65064:sixtyfortytentysixty fourth
  • 65661:sixtyfortysixteentysixty first
  • 65700:sixtyfortysixteentytentieth
  • 65809:sixtyfortyeighteentyty ninth
  • 65972:sixtyfortyeighteentysixteenty twelfth
  • 66000:sixtysixtytytieth
  • 69219:sixtyeightytwelftyty nineteenth
  • 69589:sixtyeightyfourteentyeighteenty ninth
  • 69627:sixtyeightysixteentytwenty seventh
  • 70172:sixtytentytysixteenty twelfth
  • 71569:sixtytentyfourteentysixteenty ninth
  • 71600:sixtytentysixteentytieth
  • 71920:sixtytentyeighteentytwelftieth
  • 72171:sixtytwelftytysixteenty eleventh
  • 72180:sixtytwelftytyeighteentieth
  • 73584:sixtytwelftyfourteentyeighteenty fourth
  • 74298:sixtyfourteentytwentyeighty eighteenth
  • 74790:sixtyfourteentysixtyeighteenty tenth
  • 75930:sixtyfourteentyeighteentytwelfty tenth
  • 78000:sixtyeighteentytytieth
  • 78007:sixtyeighteentytyty seventh
  • 79240:sixtyeighteentytwelftyfortieth
  • 79877:sixtyeighteentyeighteentysixty seventeenth
  • 80000:eightytytytieth
  • 83458:eightytwentyfourteentyforty eighteenth
  • 83900:eightytwentyeighteentytentieth
  • 84672:eightyfortysixtysixty twelfth
  • 85892:eightyfortyeighteentyeighty twelfth
  • 85991:eightyfortyeighteentyeighteenty eleventh
  • 86140:eightysixtytyfourteentieth
  • 87608:eightysixtysixteentyty eighth
  • 87861:eightysixtyeighteentysixty first
  • 87954:eightysixtyeighteentyfourteenty fourteenth
  • 88000:eightyeightytytieth
  • 88329:eightyeightytwentytwelfty ninth
  • 88484:eightyeightyfortyeighty fourth
  • 88552:eightyeightyfortyfourteenty twelfth
  • 88860:eightyeightyeightysixtieth
  • 90180:eightytentytyeighteentieth
  • 90935:eightytentyeightytwelfty fifteenth
  • 92555:eightytwelftyfortyfourteenty fifteenth
  • 93174:eightytwelftytentysixteenty fourteenth
  • 93371:eightytwelftytwelftysixteenty eleventh
  • 93610:eightytwelftysixteentyty tenth
  • 93642:eightytwelftysixteentyforty second
  • 94023:eightyfourteentytytwenty third
  • 94175:eightyfourteentytysixteenty fifteenth
  • 94576:eightyfourteentyfortysixteenty sixteenth
  • 94981:eightyfourteentyeightyeighteenty first
  • 95797:eightyfourteentysixteentyeighteenty seventeenth
  • 96134:eightysixteentytytwelfty fourteenth
  • 96826:eightysixteentyeightytwenty sixth
  • 97280:eightysixteentytwelftyeightieth
  • ```
  • ## Scoring
  • This is a [code golf challenge]. Your score is the number of bytes in your code.
  • > Explanations are optional, but I'm more likely to upvote answers that have one.
  • [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
  • In the fortieth century, matharchaeologists tried to reconstruct the [ordinal names for numbers](https://en.wikipedia.org/wiki/Ordinal_numeral) used in the twentieth century. Their results were not entirely accurate.
  • Write code that takes a positive integer and outputs the reconstructed ordinal name from the test cases.
  • ## Explanation
  • I considered including an algorithm in the challenge specification, but instead decided on just providing test cases and leaving this initially as an exercise in matharchaeology. If no correct answers arrive I will eventually post an answer of my own as an explanatory example, so feel free to wait until then if digging around in the data doesn’t appeal.
  • You are also free to use any approach that happens to pass all the test cases.
  • ## Input
  • - A positive integer from the test cases.
  • - You are not required to support any input not listed in the test cases. For these your code may do anything, including crash.
  • ## Output
  • - The corresponding string from the test cases.
  • - This must be in the exact format shown, including having spaces in and only in the specified places.
  • ## Example
  • Given input `224`:
  • - The correct output is `twentytwenty fourth`.
  • - It is incorrect to output `twenty twenty fourth` (due to the extra space).
  • - It is incorrect to output `twentytwentyfourth` (due to the missing space).
  • ## Test cases
  • Test cases are in the format `input:output` where the input is a positive integer, and the output is made up solely of lower case letters and sometimes spaces.
  • There are 248 test cases, spread between 1, 2, 3, 4, and 5 digit inputs.
  • ```text
  • 1:first
  • 2:second
  • 3:third
  • 4:fourth
  • 5:fifth
  • 6:sixth
  • 7:seventh
  • 8:eighth
  • 9:ninth
  • 10:tenth
  • 11:eleventh
  • 12:twelfth
  • 13:thirteenth
  • 14:fourteenth
  • 15:fifteenth
  • 16:sixteenth
  • 17:seventeenth
  • 18:eighteenth
  • 19:nineteenth
  • 20:twentieth
  • 21:twenty first
  • 22:twenty second
  • 23:twenty third
  • 24:twenty fourth
  • 25:twenty fifth
  • 26:twenty sixth
  • 27:twenty seventh
  • 28:twenty eighth
  • 29:twenty ninth
  • 30:twenty tenth
  • 31:twenty eleventh
  • 32:twenty twelfth
  • 33:twenty thirteenth
  • 34:twenty fourteenth
  • 35:twenty fifteenth
  • 36:twenty sixteenth
  • 37:twenty seventeenth
  • 38:twenty eighteenth
  • 39:twenty nineteenth
  • 40:fortieth
  • 41:forty first
  • 44:forty fourth
  • 47:forty seventh
  • 50:forty tenth
  • 53:forty thirteenth
  • 56:forty sixteenth
  • 59:forty nineteenth
  • 62:sixty second
  • 65:sixty fifth
  • 68:sixty eighth
  • 71:sixty eleventh
  • 74:sixty fourteenth
  • 77:sixty seventeenth
  • 80:eightieth
  • 83:eighty third
  • 86:eighty sixth
  • 89:eighty ninth
  • 92:eighty twelfth
  • 95:eighty fifteenth
  • 98:eighty eighteenth
  • 105:tenty fifth
  • 112:tenty twelfth
  • 119:tenty nineteenth
  • 126:twelfty sixth
  • 133:twelfty thirteenth
  • 140:fourteentieth
  • 147:fourteenty seventh
  • 154:fourteenty fourteenth
  • 161:sixteenty first
  • 168:sixteenty eighth
  • 175:sixteenty fifteenth
  • 182:eighteenty second
  • 189:eighteenty ninth
  • 196:eighteenty sixteenth
  • 203:twentyty third
  • 210:twentyty tenth
  • 217:twentyty seventeenth
  • 224:twentytwenty fourth
  • 231:twentytwenty eleventh
  • 250:twentyforty tenth
  • 269:twentysixty ninth
  • 288:twentyeighty eighth
  • 307:twentytenty seventh
  • 326:twentytwelfty sixth
  • 345:twentyfourteenty fifth
  • 364:twentysixteenty fourth
  • 383:twentyeighteenty third
  • 402:fortyty second
  • 421:fortytwenty first
  • 440:fortyfortieth
  • 459:fortyforty nineteenth
  • 478:fortysixty eighteenth
  • 497:fortyeighty seventeenth
  • 516:fortytenty sixteenth
  • 535:fortytwelfty fifteenth
  • 554:fortyfourteenty fourteenth
  • 573:fortysixteenty thirteenth
  • 592:fortyeighteenty twelfth
  • 880:eightyeightieth
  • 1283:twelftyeighty third
  • 1400:fourteentytieth
  • 1617:sixteentyty seventeenth
  • 4360:fortytwentysixteentieth
  • 4895:fortyeightyeighty fifteenth
  • 6802:sixtyeightyty second
  • 6837:sixtyeightytwenty seventeenth
  • 7999:sixtyeighteentyeighteenty nineteenth
  • 8320:eightytwentytwelftieth
  • 8944:eightyeightyfourteenty fourth
  • 9274:eightytwelftysixty fourteenth
  • 9353:eightytwelftyfourteenty thirteenth
  • 10008:tentytyty eighth
  • 10045:tentytyforty fifth
  • 10405:tentyfortyty fifth
  • 10731:tentysixtytwelfty eleventh
  • 10740:tentysixtyfourteentieth
  • 11320:tentytwelftytwelftieth
  • 13206:twelftytwelftyty sixth
  • 13240:twelftytwelftyfortieth
  • 13415:twelftyfourteentyty fifteenth
  • 13471:twelftyfourteentysixty eleventh
  • 14616:fourteentysixtyty sixteenth
  • 15348:fourteentytwelftyfourteenty eighth
  • 15560:fourteentyfourteentysixteentieth
  • 16000:sixteentytytieth
  • 17333:sixteentytwelftytwelfty thirteenth
  • 18066:eighteentytysixty sixth
  • 18263:eighteentytwentysixty third
  • 18976:eighteentyeightysixteenty sixteenth
  • 20017:twentytytyty seventeenth
  • 20018:twentytytyty eighteenth
  • 20260:twentytytwentysixtieth
  • 20955:twentytyeightyfourteenty fifteenth
  • 21445:twentytyfourteentyforty fifth
  • 21553:twentytyfourteentyfourteenty thirteenth
  • 21860:twentytyeighteentysixtieth
  • 25188:twentyfortytentyeighteenty eighth
  • 25529:twentyfortyfourteentytwelfty ninth
  • 27360:twentysixtytwelftysixteentieth
  • 27772:twentysixtysixteentysixteenty twelfth
  • 28061:twentyeightytysixty first
  • 28800:twentyeightyeightytieth
  • 29220:twentyeightytwelftytwentieth
  • 29740:twentyeightysixteentyfourteentieth
  • 29950:twentyeightyeighteentyfourteenty tenth
  • 30340:twentytentytwentyfourteentieth
  • 31036:twentytentytentytwenty sixteenth
  • 31600:twentytentysixteentytieth
  • 33680:twentytwelftysixteentyeightieth
  • 33719:twentytwelftysixteentytenty nineteenth
  • 34019:twentyfourteentytyty nineteenth
  • 34341:twentyfourteentytwentyfourteenty first
  • 34526:twentyfourteentyfortytwelfty sixth
  • 34713:twentyfourteentysixtytenty thirteenth
  • 34715:twentyfourteentysixtytenty fifteenth
  • 36650:twentysixteentysixtyforty tenth
  • 37381:twentysixteentytwelftyeighteenty first
  • 37780:twentysixteentysixteentyeighteentieth
  • 38299:twentyeighteentytwentyeighty nineteenth
  • 38982:twentyeighteentyeightyeighteenty second
  • 40000:fortytytytieth
  • 40907:fortytyeightytenty seventh
  • 41849:fortytyeighteentyforty ninth
  • 42000:fortytwentytytieth
  • 42527:fortytwentyfortytwelfty seventh
  • 43356:fortytwentytwelftyfourteenty sixteenth
  • 43382:fortytwentytwelftyeighteenty second
  • 44003:fortyfortytyty third
  • 45187:fortyfortytentyeighteenty seventh
  • 45208:fortyfortytwelftyty eighth
  • 46220:fortysixtytwentytwentieth
  • 46827:fortysixtyeightytwenty seventh
  • 47436:fortysixtyfourteentytwenty sixteenth
  • 47744:fortysixtysixteentyfourteenty fourth
  • 47800:fortysixtyeighteentytieth
  • 48198:fortyeightytyeighteenty eighteenth
  • 52100:fortytwelftytytentieth
  • 54000:fortyfourteentytytieth
  • 57340:fortysixteentytwelftyfourteentieth
  • 58010:fortyeighteentytyty tenth
  • 58705:fortyeighteentysixtytenty fifth
  • 59400:fortyeighteentyfourteentytieth
  • 59713:fortyeighteentysixteentytenty thirteenth
  • 60000:sixtytytytieth
  • 60019:sixtytytyty nineteenth
  • 60189:sixtytytyeighteenty ninth
  • 60941:sixtytyeightyfourteenty first
  • 62220:sixtytwentytwentytwentieth
  • 62314:sixtytwentytwentytenty fourteenth
  • 62754:sixtytwentysixtyfourteenty fourteenth
  • 63540:sixtytwentyfourteentyfourteentieth
  • 63965:sixtytwentyeighteentysixteenty fifth
  • 64040:sixtyfortytyfortieth
  • 64943:sixtyfortyeightyfourteenty third
  • 65063:sixtyfortytentysixty third
  • 65064:sixtyfortytentysixty fourth
  • 65661:sixtyfortysixteentysixty first
  • 65700:sixtyfortysixteentytentieth
  • 65809:sixtyfortyeighteentyty ninth
  • 65972:sixtyfortyeighteentysixteenty twelfth
  • 66000:sixtysixtytytieth
  • 69219:sixtyeightytwelftyty nineteenth
  • 69589:sixtyeightyfourteentyeighteenty ninth
  • 69627:sixtyeightysixteentytwenty seventh
  • 70172:sixtytentytysixteenty twelfth
  • 71569:sixtytentyfourteentysixteenty ninth
  • 71600:sixtytentysixteentytieth
  • 71920:sixtytentyeighteentytwelftieth
  • 72171:sixtytwelftytysixteenty eleventh
  • 72180:sixtytwelftytyeighteentieth
  • 73584:sixtytwelftyfourteentyeighteenty fourth
  • 74298:sixtyfourteentytwentyeighty eighteenth
  • 74790:sixtyfourteentysixtyeighteenty tenth
  • 75930:sixtyfourteentyeighteentytwelfty tenth
  • 78000:sixtyeighteentytytieth
  • 78007:sixtyeighteentytyty seventh
  • 79240:sixtyeighteentytwelftyfortieth
  • 79877:sixtyeighteentyeighteentysixty seventeenth
  • 80000:eightytytytieth
  • 83458:eightytwentyfourteentyforty eighteenth
  • 83900:eightytwentyeighteentytentieth
  • 84672:eightyfortysixtysixty twelfth
  • 85892:eightyfortyeighteentyeighty twelfth
  • 85991:eightyfortyeighteentyeighteenty eleventh
  • 86140:eightysixtytyfourteentieth
  • 87608:eightysixtysixteentyty eighth
  • 87861:eightysixtyeighteentysixty first
  • 87954:eightysixtyeighteentyfourteenty fourteenth
  • 88000:eightyeightytytieth
  • 88329:eightyeightytwentytwelfty ninth
  • 88484:eightyeightyfortyeighty fourth
  • 88552:eightyeightyfortyfourteenty twelfth
  • 88860:eightyeightyeightysixtieth
  • 90180:eightytentytyeighteentieth
  • 90935:eightytentyeightytwelfty fifteenth
  • 92555:eightytwelftyfortyfourteenty fifteenth
  • 93174:eightytwelftytentysixteenty fourteenth
  • 93371:eightytwelftytwelftysixteenty eleventh
  • 93610:eightytwelftysixteentyty tenth
  • 93642:eightytwelftysixteentyforty second
  • 94023:eightyfourteentytytwenty third
  • 94175:eightyfourteentytysixteenty fifteenth
  • 94576:eightyfourteentyfortysixteenty sixteenth
  • 94981:eightyfourteentyeightyeighteenty first
  • 95797:eightyfourteentysixteentyeighteenty seventeenth
  • 96134:eightysixteentytytwelfty fourteenth
  • 96826:eightysixteentyeightytwenty sixth
  • 97280:eightysixteentytwelftyeightieth
  • ```
  • ## Scoring
  • This is a [code golf challenge]. Your score is the number of bytes in your code.
  • > Explanations are optional, but I'm more likely to upvote answers that have one.
  • [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#3: Post edited by user avatar trichoplax‭ · 2025-04-18T22:38:03Z (3 days ago)
Make test cases shorter but also cover required patterns exhaustively
  • In the fortieth century, matharchaeologists tried to reconstruct the [ordinal names for numbers](https://en.wikipedia.org/wiki/Ordinal_numeral) used in the twentieth century. They didn’t get all of them exactly correct, but they were close. Kind of.
  • Write code that takes a positive integer and outputs the reconstructed ordinal name.
  • ## Explanation
  • I considered including an algorithm in the challenge specification, but instead decided on just providing test cases and leaving this initially as an exercise in matharchaeology. If no correct answers arrive I will eventually post an answer of my own as an explanatory example, so feel free to wait until then if digging around in the data doesn’t appeal.
  • ## Input
  • - A positive integer from the test cases.
  • - You are not required to support any number not listed in the test cases. For these your code may do anything, including crash.
  • ## Output
  • - The corresponding string from the test cases.
  • - This must be in the exact format shown, including having spaces in and only in the specified places.
  • ## Example
  • Given input `263`:
  • - The correct output is `twentysixty third`.
  • - It is incorrect to output `twenty sixty third` (due to the extra space).
  • - It is incorrect to output `twentysixtythird` (due to the missing space).
  • ## Test cases
  • Test cases are in the format `input:output` where the input is a positive integer, and the output is made up solely of lower case letters and sometimes spaces.
  • There are 360 test cases, spread between 1, 2, 3, 4, and 5 digit inputs.
  • ```text
  • 1:first
  • 2:second
  • 3:third
  • 4:fourth
  • 5:fifth
  • 6:sixth
  • 7:seventh
  • 8:eighth
  • 9:ninth
  • 10:tenth
  • 11:eleventh
  • 12:twelfth
  • 13:thirteenth
  • 14:fourteenth
  • 15:fifteenth
  • 16:sixteenth
  • 17:seventeenth
  • 18:eighteenth
  • 19:nineteenth
  • 20:twentieth
  • 21:twenty first
  • 22:twenty second
  • 23:twenty third
  • 24:twenty fourth
  • 25:twenty fifth
  • 26:twenty sixth
  • 27:twenty seventh
  • 28:twenty eighth
  • 29:twenty ninth
  • 30:twenty tenth
  • 31:twenty eleventh
  • 32:twenty twelfth
  • 33:twenty thirteenth
  • 34:twenty fourteenth
  • 35:twenty fifteenth
  • 36:twenty sixteenth
  • 37:twenty seventeenth
  • 38:twenty eighteenth
  • 39:twenty nineteenth
  • 40:fortieth
  • 41:forty first
  • 43:forty third
  • 44:forty fourth
  • 45:forty fifth
  • 51:forty eleventh
  • 52:forty twelfth
  • 53:forty thirteenth
  • 54:forty fourteenth
  • 56:forty sixteenth
  • 57:forty seventeenth
  • 59:forty nineteenth
  • 60:sixtieth
  • 62:sixty second
  • 63:sixty third
  • 64:sixty fourth
  • 65:sixty fifth
  • 68:sixty eighth
  • 69:sixty ninth
  • 70:sixty tenth
  • 71:sixty eleventh
  • 73:sixty thirteenth
  • 74:sixty fourteenth
  • 75:sixty fifteenth
  • 76:sixty sixteenth
  • 77:sixty seventeenth
  • 78:sixty eighteenth
  • 82:eighty second
  • 83:eighty third
  • 86:eighty sixth
  • 90:eighty tenth
  • 97:eighty seventeenth
  • 98:eighty eighteenth
  • 102:tenty second
  • 103:tenty third
  • 105:tenty fifth
  • 106:tenty sixth
  • 112:tenty twelfth
  • 113:tenty thirteenth
  • 119:tenty nineteenth
  • 120:twelftieth
  • 122:twelfty second
  • 123:twelfty third
  • 130:twelfty tenth
  • 133:twelfty thirteenth
  • 137:twelfty seventeenth
  • 139:twelfty nineteenth
  • 140:fourteentieth
  • 154:fourteenty fourteenth
  • 156:fourteenty sixteenth
  • 177:sixteenty seventeenth
  • 178:sixteenty eighteenth
  • 186:eighteenty sixth
  • 188:eighteenty eighth
  • 189:eighteenty ninth
  • 193:eighteenty thirteenth
  • 194:eighteenty fourteenth
  • 208:twentyty eighth
  • 221:twentytwenty first
  • 223:twentytwenty third
  • 225:twentytwenty fifth
  • 226:twentytwenty sixth
  • 229:twentytwenty ninth
  • 238:twentytwenty eighteenth
  • 245:twentyforty fifth
  • 253:twentyforty thirteenth
  • 263:twentysixty third
  • 275:twentysixty fifteenth
  • 277:twentysixty seventeenth
  • 279:twentysixty nineteenth
  • 289:twentyeighty ninth
  • 307:twentytenty seventh
  • 312:twentytenty twelfth
  • 313:twentytenty thirteenth
  • 322:twentytwelfty second
  • 327:twentytwelfty seventh
  • 344:twentyfourteenty fourth
  • 345:twentyfourteenty fifth
  • 356:twentyfourteenty sixteenth
  • 363:twentysixteenty third
  • 364:twentysixteenty fourth
  • 384:twentyeighteenty fourth
  • 393:twentyeighteenty thirteenth
  • 397:twentyeighteenty seventeenth
  • 398:twentyeighteenty eighteenth
  • 401:fortyty first
  • 409:fortyty ninth
  • 410:fortyty tenth
  • 413:fortyty thirteenth
  • 443:fortyforty third
  • 444:fortyforty fourth
  • 462:fortysixty second
  • 463:fortysixty third
  • 464:fortysixty fourth
  • 465:fortysixty fifth
  • 487:fortyeighty seventh
  • 490:fortyeighty tenth
  • 503:fortytenty third
  • 521:fortytwelfty first
  • 540:fortyfourteentieth
  • 574:fortysixteenty fourteenth
  • 582:fortyeighteenty second
  • 585:fortyeighteenty fifth
  • 587:fortyeighteenty seventh
  • 599:fortyeighteenty nineteenth
  • 605:sixtyty fifth
  • 606:sixtyty sixth
  • 613:sixtyty thirteenth
  • 623:sixtytwenty third
  • 626:sixtytwenty sixth
  • 640:sixtyfortieth
  • 650:sixtyforty tenth
  • 658:sixtyforty eighteenth
  • 665:sixtysixty fifth
  • 669:sixtysixty ninth
  • 678:sixtysixty eighteenth
  • 693:sixtyeighty thirteenth
  • 699:sixtyeighty nineteenth
  • 708:sixtytenty eighth
  • 712:sixtytenty twelfth
  • 725:sixtytwelfty fifth
  • 729:sixtytwelfty ninth
  • 746:sixtyfourteenty sixth
  • 754:sixtyfourteenty fourteenth
  • 817:eightyty seventeenth
  • 823:eightytwenty third
  • 826:eightytwenty sixth
  • 871:eightysixty eleventh
  • 874:eightysixty fourteenth
  • 909:eightytenty ninth
  • 933:eightytwelfty thirteenth
  • 945:eightyfourteenty fifth
  • 983:eightyeighteenty third
  • 985:eightyeighteenty fifth
  • 1007:tentyty seventh
  • 1010:tentyty tenth
  • 1017:tentyty seventeenth
  • 1032:tentytwenty twelfth
  • 1046:tentyforty sixth
  • 1061:tentysixty first
  • 1142:tentyfourteenty second
  • 1153:tentyfourteenty thirteenth
  • 1179:tentysixteenty nineteenth
  • 1231:twelftytwenty eleventh
  • 1253:twelftyforty thirteenth
  • 1269:twelftysixty ninth
  • 1286:twelftyeighty sixth
  • 1293:twelftyeighty thirteenth
  • 1329:twelftytwelfty ninth
  • 1331:twelftytwelfty eleventh
  • 1447:fourteentyforty seventh
  • 1504:fourteentytenty fourth
  • 1510:fourteentytenty tenth
  • 1524:fourteentytwelfty fourth
  • 1551:fourteentyfourteenty eleventh
  • 1557:fourteentyfourteenty seventeenth
  • 1788:sixteentyeighteenty eighth
  • 1792:sixteentyeighteenty twelfth
  • 1828:eighteentytwenty eighth
  • 1860:eighteentysixtieth
  • 1873:eighteentysixty thirteenth
  • 1892:eighteentyeighty twelfth
  • 2081:twentytyeighty first
  • 2194:twentytyeighteenty fourteenth
  • 2311:twentytwentytenty eleventh
  • 2345:twentytwentyfourteenty fifth
  • 2517:twentyfortytenty seventeenth
  • 2547:twentyfortyfourteenty seventh
  • 2577:twentyfortysixteenty seventeenth
  • 2597:twentyfortyeighteenty seventeenth
  • 2644:twentysixtyforty fourth
  • 2684:twentysixtyeighty fourth
  • 2715:twentysixtytenty fifteenth
  • 2727:twentysixtytwelfty seventh
  • 2784:twentysixtyeighteenty fourth
  • 2881:twentyeightyeighty first
  • 2906:twentyeightytenty sixth
  • 2925:twentyeightytwelfty fifth
  • 2937:twentyeightytwelfty seventeenth
  • 3215:twentytwelftyty fifteenth
  • 3290:twentytwelftyeighty tenth
  • 3473:twentyfourteentysixty thirteenth
  • 3682:twentysixteentyeighty second
  • 3742:twentysixteentyfourteenty second
  • 3775:twentysixteentysixteenty fifteenth
  • 3791:twentysixteentyeighteenty eleventh
  • 3988:twentyeighteentyeighteenty eighth
  • 4036:fortytytwenty sixteenth
  • 4130:fortytytwelfty tenth
  • 4187:fortytyeighteenty seventh
  • 4364:fortytwentysixteenty fourth
  • 4420:fortyfortytwentieth
  • 4554:fortyfortyfourteenty fourteenth
  • 4569:fortyfortysixteenty ninth
  • 4709:fortysixtytenty ninth
  • 5202:fortytwelftyty second
  • 5538:fortyfourteentytwelfty eighteenth
  • 5682:fortysixteentyeighty second
  • 5720:fortysixteentytwelftieth
  • 6139:sixtytytwelfty nineteenth
  • 6149:sixtytyfourteenty ninth
  • 6451:sixtyfortyforty eleventh
  • 6487:sixtyfortyeighty seventh
  • 6563:sixtyfortysixteenty third
  • 6776:sixtysixtysixteenty sixteenth
  • 6894:sixtyeightyeighty fourteenth
  • 7009:sixtytentyty ninth
  • 7206:sixtytwelftyty sixth
  • 7267:sixtytwelftysixty seventh
  • 7686:sixtysixteentyeighty sixth
  • 7831:sixtyeighteentytwenty eleventh
  • 7956:sixtyeighteentyfourteenty sixteenth
  • 8213:eightytwentyty thirteenth
  • 8345:eightytwentyfourteenty fifth
  • 8446:eightyfortyforty sixth
  • 8506:eightyfortytenty sixth
  • 8873:eightyeightysixty thirteenth
  • 9034:eightytentytwenty fourteenth
  • 9106:eightytentytenty sixth
  • 9294:eightytwelftyeighty fourteenth
  • 9468:eightyfourteentysixty eighth
  • 9529:eightyfourteentytwelfty ninth
  • 9774:eightysixteentysixteenty fourteenth
  • 9886:eightyeighteentyeighty sixth
  • 10011:tentytyty eleventh
  • 10447:tentyfortyforty seventh
  • 10790:tentysixtyeighteenty tenth
  • 11296:tentytwelftyeighty sixteenth
  • 11472:tentyfourteentysixty twelfth
  • 12084:twelftytyeighty fourth
  • 12261:twelftytwentysixty first
  • 12328:twelftytwentytwelfty eighth
  • 12490:twelftyfortyeighty tenth
  • 13756:twelftysixteentyfourteenty sixteenth
  • 13858:twelftyeighteentyforty eighteenth
  • 14017:fourteentytyty seventeenth
  • 14047:fourteentytyforty seventh
  • 14132:fourteentytytwelfty twelfth
  • 14167:fourteentytysixteenty seventh
  • 14225:fourteentytwentytwenty fifth
  • 14912:fourteentyeightytenty twelfth
  • 15234:fourteentytwelftytwenty fourteenth
  • 15571:fourteentyfourteentysixteenty eleventh
  • 15665:fourteentysixteentysixty fifth
  • 15879:fourteentyeighteentysixty nineteenth
  • 15946:fourteentyeighteentyfourteenty sixth
  • 16120:sixteentytytwelftieth
  • 16164:sixteentytysixteenty fourth
  • 16493:sixteentyfortyeighty thirteenth
  • 17062:sixteentytentysixty second
  • 17067:sixteentytentysixty seventh
  • 17799:sixteentysixteentyeighteenty nineteenth
  • 17858:sixteentyeighteentyforty eighteenth
  • 18247:eighteentytwentyforty seventh
  • 19052:eighteentytentyforty twelfth
  • 19147:eighteentytentyfourteenty seventh
  • 19165:eighteentytentysixteenty fifth
  • 19181:eighteentytentyeighteenty first
  • 19817:eighteentyeighteentyty seventeenth
  • 19974:eighteentyeighteentysixteenty fourteenth
  • 20249:twentytytwentyforty ninth
  • 20574:twentytyfortysixteenty fourteenth
  • 20874:twentytyeightysixty fourteenth
  • 22169:twentytwentytysixteenty ninth
  • 22507:twentytwentyfortytenty seventh
  • 23032:twentytwentytentytwenty twelfth
  • 24004:twentyfortytyty fourth
  • 24202:twentyfortytwentyty second
  • 24522:twentyfortyfortytwelfty second
  • 26261:twentysixtytwentysixty first
  • 26308:twentysixtytwentytenty eighth
  • 26477:twentysixtyfortysixty seventeenth
  • 27973:twentysixtyeighteentysixteenty thirteenth
  • 27987:twentysixtyeighteentyeighteenty seventh
  • 28393:twentyeightytwentyeighteenty thirteenth
  • 28460:twentyeightyfortysixtieth
  • 28665:twentyeightysixtysixty fifth
  • 28864:twentyeightyeightysixty fourth
  • 29819:twentyeightyeighteentyty nineteenth
  • 30320:twentytentytwentytwelftieth
  • 31563:twentytentyfourteentysixteenty third
  • 32568:twentytwelftyfortysixteenty eighth
  • 32595:twentytwelftyfortyeighteenty fifteenth
  • 33321:twentytwelftytwelftytwelfty first
  • 33692:twentytwelftysixteentyeighty twelfth
  • 39060:twentyeighteentytentysixtieth
  • 39324:twentyeighteentytwelftytwelfty fourth
  • 39830:twentyeighteentyeighteentytwenty tenth
  • 40816:fortytyeightyty sixteenth
  • 41145:fortytytentyfourteenty fifth
  • 41586:fortytyfourteentyeighteenty sixth
  • 44591:fortyfortyfortyeighteenty eleventh
  • 45027:fortyfortytentytwenty seventh
  • 45112:fortyfortytentytenty twelfth
  • 56920:fortysixteentyeightytwelftieth
  • 57567:fortysixteentyfourteentysixteenty seventh
  • 58277:fortyeighteentytwentysixty seventeenth
  • 58746:fortyeighteentysixtyfourteenty sixth
  • 58965:fortyeighteentyeightysixteenty fifth
  • 61467:sixtytyfourteentysixty seventh
  • 62777:sixtytwentysixtysixteenty seventeenth
  • 63679:sixtytwentysixteentysixty nineteenth
  • 64764:sixtyfortysixtysixteenty fourth
  • 65875:sixtyfortyeighteentysixty fifteenth
  • 73195:sixtytwelftytentyeighteenty fifteenth
  • 74915:sixtyfourteentyeightytenty fifteenth
  • 75698:sixtyfourteentysixteentyeighty eighteenth
  • 76695:sixtysixteentysixtyeighty fifteenth
  • 78516:sixtyeighteentyfortytenty sixteenth
  • 79344:sixtyeighteentytwelftyfourteenty fourth
  • 80133:eightytytytwelfty thirteenth
  • 80579:eightytyfortysixteenty nineteenth
  • 81398:eightytytwelftyeighteenty eighteenth
  • 84430:eightyfortyfortytwenty tenth
  • 85730:eightyfortysixteentytwelfty tenth
  • 93333:eightytwelftytwelftytwelfty thirteenth
  • 94705:eightyfourteentysixtytenty fifth
  • 95727:eightyfourteentysixteentytwelfty seventh
  • 98275:eightyeighteentytwentysixty fifteenth
  • 98388:eightyeighteentytwentyeighteenty eighth
  • 98684:eightyeighteentysixtyeighty fourth
  • ```
  • ## Scoring
  • This is a [code golf challenge]. Your score is the number of bytes in your code.
  • > Explanations are optional, but I'm more likely to upvote answers that have one.
  • [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
  • In the fortieth century, matharchaeologists tried to reconstruct the [ordinal names for numbers](https://en.wikipedia.org/wiki/Ordinal_numeral) used in the twentieth century. They didn’t get all of them exactly correct, but they were close. Kind of.
  • Write code that takes a positive integer and outputs the reconstructed ordinal name.
  • ## Explanation
  • I considered including an algorithm in the challenge specification, but instead decided on just providing test cases and leaving this initially as an exercise in matharchaeology. If no correct answers arrive I will eventually post an answer of my own as an explanatory example, so feel free to wait until then if digging around in the data doesn’t appeal.
  • ## Input
  • - A positive integer from the test cases.
  • - You are not required to support any number not listed in the test cases. For these your code may do anything, including crash.
  • ## Output
  • - The corresponding string from the test cases.
  • - This must be in the exact format shown, including having spaces in and only in the specified places.
  • ## Example
  • Given input `224`:
  • - The correct output is `twentytwenty fourth`.
  • - It is incorrect to output `twenty twenty fourth` (due to the extra space).
  • - It is incorrect to output `twentytwentyfourth` (due to the missing space).
  • ## Test cases
  • Test cases are in the format `input:output` where the input is a positive integer, and the output is made up solely of lower case letters and sometimes spaces.
  • There are 248 test cases, spread between 1, 2, 3, 4, and 5 digit inputs.
  • ```text
  • 1:first
  • 2:second
  • 3:third
  • 4:fourth
  • 5:fifth
  • 6:sixth
  • 7:seventh
  • 8:eighth
  • 9:ninth
  • 10:tenth
  • 11:eleventh
  • 12:twelfth
  • 13:thirteenth
  • 14:fourteenth
  • 15:fifteenth
  • 16:sixteenth
  • 17:seventeenth
  • 18:eighteenth
  • 19:nineteenth
  • 20:twentieth
  • 21:twenty first
  • 22:twenty second
  • 23:twenty third
  • 24:twenty fourth
  • 25:twenty fifth
  • 26:twenty sixth
  • 27:twenty seventh
  • 28:twenty eighth
  • 29:twenty ninth
  • 30:twenty tenth
  • 31:twenty eleventh
  • 32:twenty twelfth
  • 33:twenty thirteenth
  • 34:twenty fourteenth
  • 35:twenty fifteenth
  • 36:twenty sixteenth
  • 37:twenty seventeenth
  • 38:twenty eighteenth
  • 39:twenty nineteenth
  • 40:fortieth
  • 41:forty first
  • 44:forty fourth
  • 47:forty seventh
  • 50:forty tenth
  • 53:forty thirteenth
  • 56:forty sixteenth
  • 59:forty nineteenth
  • 62:sixty second
  • 65:sixty fifth
  • 68:sixty eighth
  • 71:sixty eleventh
  • 74:sixty fourteenth
  • 77:sixty seventeenth
  • 80:eightieth
  • 83:eighty third
  • 86:eighty sixth
  • 89:eighty ninth
  • 92:eighty twelfth
  • 95:eighty fifteenth
  • 98:eighty eighteenth
  • 105:tenty fifth
  • 112:tenty twelfth
  • 119:tenty nineteenth
  • 126:twelfty sixth
  • 133:twelfty thirteenth
  • 140:fourteentieth
  • 147:fourteenty seventh
  • 154:fourteenty fourteenth
  • 161:sixteenty first
  • 168:sixteenty eighth
  • 175:sixteenty fifteenth
  • 182:eighteenty second
  • 189:eighteenty ninth
  • 196:eighteenty sixteenth
  • 203:twentyty third
  • 210:twentyty tenth
  • 217:twentyty seventeenth
  • 224:twentytwenty fourth
  • 231:twentytwenty eleventh
  • 250:twentyforty tenth
  • 269:twentysixty ninth
  • 288:twentyeighty eighth
  • 307:twentytenty seventh
  • 326:twentytwelfty sixth
  • 345:twentyfourteenty fifth
  • 364:twentysixteenty fourth
  • 383:twentyeighteenty third
  • 402:fortyty second
  • 421:fortytwenty first
  • 440:fortyfortieth
  • 459:fortyforty nineteenth
  • 478:fortysixty eighteenth
  • 497:fortyeighty seventeenth
  • 516:fortytenty sixteenth
  • 535:fortytwelfty fifteenth
  • 554:fortyfourteenty fourteenth
  • 573:fortysixteenty thirteenth
  • 592:fortyeighteenty twelfth
  • 880:eightyeightieth
  • 1283:twelftyeighty third
  • 1400:fourteentytieth
  • 1617:sixteentyty seventeenth
  • 4360:fortytwentysixteentieth
  • 4895:fortyeightyeighty fifteenth
  • 6802:sixtyeightyty second
  • 6837:sixtyeightytwenty seventeenth
  • 7999:sixtyeighteentyeighteenty nineteenth
  • 8320:eightytwentytwelftieth
  • 8944:eightyeightyfourteenty fourth
  • 9274:eightytwelftysixty fourteenth
  • 9353:eightytwelftyfourteenty thirteenth
  • 10008:tentytyty eighth
  • 10045:tentytyforty fifth
  • 10405:tentyfortyty fifth
  • 10731:tentysixtytwelfty eleventh
  • 10740:tentysixtyfourteentieth
  • 11320:tentytwelftytwelftieth
  • 13206:twelftytwelftyty sixth
  • 13240:twelftytwelftyfortieth
  • 13415:twelftyfourteentyty fifteenth
  • 13471:twelftyfourteentysixty eleventh
  • 14616:fourteentysixtyty sixteenth
  • 15348:fourteentytwelftyfourteenty eighth
  • 15560:fourteentyfourteentysixteentieth
  • 16000:sixteentytytieth
  • 17333:sixteentytwelftytwelfty thirteenth
  • 18066:eighteentytysixty sixth
  • 18263:eighteentytwentysixty third
  • 18976:eighteentyeightysixteenty sixteenth
  • 20017:twentytytyty seventeenth
  • 20018:twentytytyty eighteenth
  • 20260:twentytytwentysixtieth
  • 20955:twentytyeightyfourteenty fifteenth
  • 21445:twentytyfourteentyforty fifth
  • 21553:twentytyfourteentyfourteenty thirteenth
  • 21860:twentytyeighteentysixtieth
  • 25188:twentyfortytentyeighteenty eighth
  • 25529:twentyfortyfourteentytwelfty ninth
  • 27360:twentysixtytwelftysixteentieth
  • 27772:twentysixtysixteentysixteenty twelfth
  • 28061:twentyeightytysixty first
  • 28800:twentyeightyeightytieth
  • 29220:twentyeightytwelftytwentieth
  • 29740:twentyeightysixteentyfourteentieth
  • 29950:twentyeightyeighteentyfourteenty tenth
  • 30340:twentytentytwentyfourteentieth
  • 31036:twentytentytentytwenty sixteenth
  • 31600:twentytentysixteentytieth
  • 33680:twentytwelftysixteentyeightieth
  • 33719:twentytwelftysixteentytenty nineteenth
  • 34019:twentyfourteentytyty nineteenth
  • 34341:twentyfourteentytwentyfourteenty first
  • 34526:twentyfourteentyfortytwelfty sixth
  • 34713:twentyfourteentysixtytenty thirteenth
  • 34715:twentyfourteentysixtytenty fifteenth
  • 36650:twentysixteentysixtyforty tenth
  • 37381:twentysixteentytwelftyeighteenty first
  • 37780:twentysixteentysixteentyeighteentieth
  • 38299:twentyeighteentytwentyeighty nineteenth
  • 38982:twentyeighteentyeightyeighteenty second
  • 40000:fortytytytieth
  • 40907:fortytyeightytenty seventh
  • 41849:fortytyeighteentyforty ninth
  • 42000:fortytwentytytieth
  • 42527:fortytwentyfortytwelfty seventh
  • 43356:fortytwentytwelftyfourteenty sixteenth
  • 43382:fortytwentytwelftyeighteenty second
  • 44003:fortyfortytyty third
  • 45187:fortyfortytentyeighteenty seventh
  • 45208:fortyfortytwelftyty eighth
  • 46220:fortysixtytwentytwentieth
  • 46827:fortysixtyeightytwenty seventh
  • 47436:fortysixtyfourteentytwenty sixteenth
  • 47744:fortysixtysixteentyfourteenty fourth
  • 47800:fortysixtyeighteentytieth
  • 48198:fortyeightytyeighteenty eighteenth
  • 52100:fortytwelftytytentieth
  • 54000:fortyfourteentytytieth
  • 57340:fortysixteentytwelftyfourteentieth
  • 58010:fortyeighteentytyty tenth
  • 58705:fortyeighteentysixtytenty fifth
  • 59400:fortyeighteentyfourteentytieth
  • 59713:fortyeighteentysixteentytenty thirteenth
  • 60000:sixtytytytieth
  • 60019:sixtytytyty nineteenth
  • 60189:sixtytytyeighteenty ninth
  • 60941:sixtytyeightyfourteenty first
  • 62220:sixtytwentytwentytwentieth
  • 62314:sixtytwentytwentytenty fourteenth
  • 62754:sixtytwentysixtyfourteenty fourteenth
  • 63540:sixtytwentyfourteentyfourteentieth
  • 63965:sixtytwentyeighteentysixteenty fifth
  • 64040:sixtyfortytyfortieth
  • 64943:sixtyfortyeightyfourteenty third
  • 65063:sixtyfortytentysixty third
  • 65064:sixtyfortytentysixty fourth
  • 65661:sixtyfortysixteentysixty first
  • 65700:sixtyfortysixteentytentieth
  • 65809:sixtyfortyeighteentyty ninth
  • 65972:sixtyfortyeighteentysixteenty twelfth
  • 66000:sixtysixtytytieth
  • 69219:sixtyeightytwelftyty nineteenth
  • 69589:sixtyeightyfourteentyeighteenty ninth
  • 69627:sixtyeightysixteentytwenty seventh
  • 70172:sixtytentytysixteenty twelfth
  • 71569:sixtytentyfourteentysixteenty ninth
  • 71600:sixtytentysixteentytieth
  • 71920:sixtytentyeighteentytwelftieth
  • 72171:sixtytwelftytysixteenty eleventh
  • 72180:sixtytwelftytyeighteentieth
  • 73584:sixtytwelftyfourteentyeighteenty fourth
  • 74298:sixtyfourteentytwentyeighty eighteenth
  • 74790:sixtyfourteentysixtyeighteenty tenth
  • 75930:sixtyfourteentyeighteentytwelfty tenth
  • 78000:sixtyeighteentytytieth
  • 78007:sixtyeighteentytyty seventh
  • 79240:sixtyeighteentytwelftyfortieth
  • 79877:sixtyeighteentyeighteentysixty seventeenth
  • 80000:eightytytytieth
  • 83458:eightytwentyfourteentyforty eighteenth
  • 83900:eightytwentyeighteentytentieth
  • 84672:eightyfortysixtysixty twelfth
  • 85892:eightyfortyeighteentyeighty twelfth
  • 85991:eightyfortyeighteentyeighteenty eleventh
  • 86140:eightysixtytyfourteentieth
  • 87608:eightysixtysixteentyty eighth
  • 87861:eightysixtyeighteentysixty first
  • 87954:eightysixtyeighteentyfourteenty fourteenth
  • 88000:eightyeightytytieth
  • 88329:eightyeightytwentytwelfty ninth
  • 88484:eightyeightyfortyeighty fourth
  • 88552:eightyeightyfortyfourteenty twelfth
  • 88860:eightyeightyeightysixtieth
  • 90180:eightytentytyeighteentieth
  • 90935:eightytentyeightytwelfty fifteenth
  • 92555:eightytwelftyfortyfourteenty fifteenth
  • 93174:eightytwelftytentysixteenty fourteenth
  • 93371:eightytwelftytwelftysixteenty eleventh
  • 93610:eightytwelftysixteentyty tenth
  • 93642:eightytwelftysixteentyforty second
  • 94023:eightyfourteentytytwenty third
  • 94175:eightyfourteentytysixteenty fifteenth
  • 94576:eightyfourteentyfortysixteenty sixteenth
  • 94981:eightyfourteentyeightyeighteenty first
  • 95797:eightyfourteentysixteentyeighteenty seventeenth
  • 96134:eightysixteentytytwelfty fourteenth
  • 96826:eightysixteentyeightytwenty sixth
  • 97280:eightysixteentytwelftyeightieth
  • ```
  • ## Scoring
  • This is a [code golf challenge]. Your score is the number of bytes in your code.
  • > Explanations are optional, but I'm more likely to upvote answers that have one.
  • [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#2: Post edited by user avatar trichoplax‭ · 2025-04-15T06:39:20Z (6 days ago)
Replace test cases with better distribution of inputs and more golfable outputs
  • In the fortieth century, matharchaeologists tried to reconstruct the [ordinal names for numbers](https://en.wikipedia.org/wiki/Ordinal_numeral) used in the twentieth century. They didn’t get all of them exactly correct, but they were close. Kind of.
  • Write code that outputs the reconstructed ordinal name for any of the 468 test cases.
  • ## Explanation
  • I considered including an algorithm in the challenge specification, but instead decided on leaving this initially as an exercise in matharchaeology. If no correct answers arrive I will eventually post an answer of my own as an explanatory example, so feel free to wait until then if digging around in the data doesn’t appeal.
  • ## Input
  • - A number from the test cases.
  • - You are not required to support any number not listed in the test cases. For these your code may do anything, including crash.
  • ## Output
  • - The corresponding string from the test cases.
  • - This must be in the exact format shown, including having spaces in and only in the specified places.
  • ## Example
  • Given input `268`:
  • - The correct output is `twentysixty eighth`.
  • - It is incorrect to output `twenty sixty eighth`.
  • - It is incorrect to output `twentysixtyeighth`.
  • ## Test cases
  • Test cases are in the format `input:output` where the input is a multidigit decimal positive whole number, and the output is made up solely of lower case letters and sometimes spaces.
  • ```text
  • 268:twentysixty eighth
  • 353:twentyfifteenty third
  • 511:fortyeleventy first
  • 677:sixtyseventy seventh
  • 850:eightyfiftieth
  • 912:eightyeleventy second
  • 1008:tentyty eighth
  • 1173:tentyseventeenty third
  • 1935:eighteentythirteenty fifth
  • 2193:twentytynineteenty third
  • 2268:twentytwentysixty eighth
  • 2273:twentytwentyseventy third
  • 2331:twentytwentythirteenty first
  • 2606:twentysixtyty sixth
  • 2853:twentyeightyfifty third
  • 2885:twentyeightyeighty fifth
  • 2994:twentyeightynineteenty fourth
  • 2998:twentyeightynineteenty eighth
  • 3016:twentytentyonety sixth
  • 3185:twentytentyeighteenty fifth
  • 3306:twentythirteentyty sixth
  • 3549:twentyfourteentyfourteenty ninth
  • 3662:twentysixteentysixty second
  • 3676:twentysixteentyseventy sixth
  • 3829:twentyeighteentytwenty ninth
  • 3897:twentyeighteentyninety seventh
  • 4901:fortyninetyty first
  • 4936:fortyeightythirteenty sixth
  • 4950:fortyeightyfifteentieth
  • 4992:fortyeightynineteenty second
  • 5380:fortytwelftyeighteentieth
  • 5462:fortyfourteentysixty second
  • 5515:fortyfourteentyeleventy fifth
  • 5632:fortysixteentythirty second
  • 5663:fortysixteentysixty third
  • 6009:sixtytyty ninth
  • 6084:sixtytyeighty fourth
  • 6341:sixtytwentyfourteenty first
  • 6578:sixtyfortyseventeenty eighth
  • 7462:sixtyfourteentysixty second
  • 7509:sixtyfifteentyty ninth
  • 7896:sixtyeighteentyninety sixth
  • 7928:sixtyeighteentytwelfty eighth
  • 8059:eightytyfifty ninth
  • 8119:eightytyeleventy ninth
  • 8218:eightytwentyonety eighth
  • 8264:eightytwentysixty fourth
  • 8351:eightytwentyfifteenty first
  • 8733:eightysixtythirteenty third
  • 8788:eightysixtyeighteenty eighth
  • 8845:eightyeightyforty fifth
  • 9366:eightytwelftysixteenty sixth
  • 9424:eightyfourteentytwenty fourth
  • 9464:eightyfourteentysixty fourth
  • 9492:eightyfourteentyninety second
  • 9554:eightyfourteentyfifteenty fourth
  • 9621:eightysixteentytwenty first
  • 9648:eightysixteentyforty eighth
  • 9891:eightyeighteentyninety first
  • 11000:eleventytytieth
  • 11118:eleventytyeleventy eighth
  • 11317:tentytwelftyeleventy seventh
  • 11419:tentyfourteentyonety ninth
  • 11939:tentyeighteentythirteenty ninth
  • 12057:twelftytyfifty seventh
  • 12480:twelftyfortyeightieth
  • 12789:twelftysixtyeighteenty ninth
  • 12864:twelftyeightysixty fourth
  • 13213:twelftytwelftyonety third
  • 13287:twelftytwelftyeighty seventh
  • 13388:twelftytwelftyeighteenty eighth
  • 13580:twelftyfourteentyeighteentieth
  • 13726:twelftysixteentytwelfty sixth
  • 14043:fourteentytyforty third
  • 15095:fifteentytyninety fifth
  • 15178:fifteentytyseventeenty eighth
  • 15444:fourteentyfourteentyforty fourth
  • 15533:fourteentyfourteentythirteenty third
  • 15652:fourteentysixteentyfifty second
  • 15851:fourteentyeighteentyfifty first
  • 15872:fourteentyeighteentyseventy second
  • 15971:fourteentyeighteentyseventeenty first
  • 16372:sixteentytwentyseventeenty second
  • 16502:sixteentyfiftyty second
  • 16843:sixteentyeightyforty third
  • 17022:seventeentytytwenty second
  • 17657:sixteentysixteentyfifty seventh
  • 17840:sixteentyeighteentyfortieth
  • 17954:sixteentyeighteentyfifteenty fourth
  • 18162:eighteentytysixteenty second
  • 18289:eighteentytwentyeighty ninth
  • 18455:eighteentyfortyfifty fifth
  • 18486:eighteentyfortyeighty sixth
  • 18510:eighteentyfortyeleventieth
  • 18570:eighteentyfortyseventeentieth
  • 18621:eighteentysixtytwenty first
  • 18718:eighteentysixtyeleventy eighth
  • 19116:nineteentytyeleventy sixth
  • 19252:eighteentytwelftyfifty second
  • 19361:eighteentytwelftysixteenty first
  • 19580:eighteentyfourteentyeighteentieth
  • 19798:eighteentysixteentynineteenty eighth
  • 19802:eighteentyeighteentyty second
  • 19977:eighteentyeighteentyseventeenty seventh
  • 20011:twentytytyonety first
  • 20092:twentytytyninety second
  • 20114:twentytytyeleventy fourth
  • 20499:twentytyfortyninety ninth
  • 20628:twentytysixtytwenty eighth
  • 20654:twentytysixtyfifty fourth
  • 20731:twentytysixtythirteenty first
  • 20819:twentytyeightyonety ninth
  • 20962:twentytyeightysixteenty second
  • 20989:twentytyeightyeighteenty ninth
  • 21051:twentyonetytyfifty first
  • 21162:twentyonetytysixteenty second
  • 21303:twentytythirteentyty third
  • 21460:twentytyfourteentysixtieth
  • 21491:twentytyfourteentyninety first
  • 21531:twentytyfourteentythirteenty first
  • 21710:twentytysixteentyeleventieth
  • 23165:twentythirtytysixteenty fifth
  • 23335:twentytwentytwelftythirteenty fifth
  • 23603:twentytwentysixteentyty third
  • 23878:twentytwentyeighteentyseventy eighth
  • 23880:twentytwentyeighteentyeightieth
  • 24227:twentyfortytwentytwenty seventh
  • 24508:twentyfortyfiftyty eighth
  • 24693:twentyfortysixtyninety third
  • 24702:twentyfortyseventyty second
  • 24749:twentyfortysixtyfourteenty ninth
  • 24835:twentyfortyeightythirty fifth
  • 24856:twentyfortyeightyfifty sixth
  • 25216:twentyfortytwelftyonety sixth
  • 25347:twentyfortytwelftyfourteenty seventh
  • 25430:twentyfortyfourteentythirtieth
  • 25579:twentyfortyfourteentyseventeenty ninth
  • 25979:twentyfortyeighteentyseventeenty ninth
  • 26359:twentysixtytwentyfifteenty ninth
  • 26381:twentysixtytwentyeighteenty first
  • 26528:twentysixtyfortytwelfty eighth
  • 26854:twentysixtyeightyfifty fourth
  • 27258:twentysixtytwelftyfifty eighth
  • 27361:twentysixtytwelftysixteenty first
  • 27370:twentysixtytwelftyseventeentieth
  • 28088:twentyeightytyeighty eighth
  • 28404:twentyeightyfortyty fourth
  • 28831:twentyeightyeightythirty first
  • 30042:twentytentytyforty second
  • 30073:twentytentytyseventy third
  • 30165:twentytentytysixteenty fifth
  • 30350:twentytentytwentyfifteentieth
  • 30640:twentytentysixtyfortieth
  • 30807:twentytentyeightyty seventh
  • 32197:twentytwelftytynineteenty seventh
  • 32207:twentytwelftytwentyty seventh
  • 33065:twentythirteentytysixty fifth
  • 33528:twentytwelftyfourteentytwelfty eighth
  • 33789:twentytwelftysixteentyeighteenty ninth
  • 34292:twentyfourteentytwentyninety second
  • 34633:twentyfourteentysixtythirty third
  • 34732:twentyfourteentysixtythirteenty second
  • 35113:twentyfifteentytyeleventy third
  • 35475:twentyfourteentyfourteentyseventy fifth
  • 35608:twentyfourteentysixteentyty eighth
  • 35928:twentyfourteentyeighteentytwelfty eighth
  • 36796:twentysixteentysixtynineteenty sixth
  • 37205:twentysixteentytwelftyty fifth
  • 37398:twentysixteentytwelftynineteenty eighth
  • 37950:twentysixteentyeighteentyfifteentieth
  • 38032:twentyeighteentytythirty second
  • 38414:twentyeighteentyfortyonety fourth
  • 38436:twentyeighteentyfortythirty sixth
  • 38474:twentyeighteentyfortyseventy fourth
  • 38716:twentyeighteentysixtyeleventy sixth
  • 38729:twentyeighteentysixtytwelfty ninth
  • 38940:twentyeighteentyeightyfourteentieth
  • 39144:twentynineteentytyfourteenty fourth
  • 40003:fortytytyty third
  • 40055:fortytytyfifty fifth
  • 40511:fortytyfortyeleventy first
  • 40841:fortytyeightyforty first
  • 41047:fortyonetytyforty seventh
  • 41055:fortyonetytyfifty fifth
  • 41349:fortytytwelftyfourteenty ninth
  • 41936:fortytyeighteentythirteenty sixth
  • 42301:fortytwentythirtyty first
  • 42432:fortytwentyfortythirty second
  • 42552:fortytwentyfortyfifteenty second
  • 42620:fortytwentysixtytwentieth
  • 42669:fortytwentysixtysixty ninth
  • 43376:fortytwentytwelftyseventeenty sixth
  • 43510:fortytwentyfourteentyeleventieth
  • 43552:fortytwentyfourteentyfifteenty second
  • 43759:fortytwentysixteentyfifteenty ninth
  • 43804:fortytwentyeighteentyty fourth
  • 43899:fortytwentyeighteentyninety ninth
  • 43934:fortytwentyeighteentythirteenty fourth
  • 43973:fortytwentyeighteentyseventeenty third
  • 44337:fortyfortytwentythirteenty seventh
  • 44548:fortyfortyfortyfourteenty eighth
  • 44867:fortyfortyeightysixty seventh
  • 44877:fortyfortyeightyseventy seventh
  • 45180:fortyfiftytyeighteentieth
  • 45601:fortyfortysixteentyty first
  • 45686:fortyfortysixteentyeighty sixth
  • 46248:fortysixtytwentyforty eighth
  • 46369:fortysixtytwentysixteenty ninth
  • 46393:fortysixtytwentynineteenty third
  • 46720:fortysixtysixtytwelftieth
  • 46948:fortysixtyeightyfourteenty eighth
  • 47044:fortyseventytyforty fourth
  • 47069:fortyseventytysixty ninth
  • 47227:fortysixtytwelftytwenty seventh
  • 47335:fortysixtytwelftythirteenty fifth
  • 47378:fortysixtytwelftyseventeenty eighth
  • 47793:fortysixtysixteentynineteenty third
  • 47960:fortysixtyeighteentysixteentieth
  • 48144:fortyeightytyfourteenty fourth
  • 48154:fortyeightytyfifteenty fourth
  • 48175:fortyeightytyseventeenty fifth
  • 48189:fortyeightytyeighteenty ninth
  • 48224:fortyeightytwentytwenty fourth
  • 48291:fortyeightytwentyninety first
  • 48565:fortyeightyfortysixteenty fifth
  • 48738:fortyeightysixtythirteenty eighth
  • 48776:fortyeightysixtyseventeenty sixth
  • 48829:fortyeightyeightytwenty ninth
  • 49038:fortyninetytythirty eighth
  • 49044:fortyninetytyforty fourth
  • 49095:fortyninetytyninety fifth
  • 49485:fortyeightyfourteentyeighty fifth
  • 49679:fortyeightysixteentyseventy ninth
  • 49733:fortyeightysixteentythirteenty third
  • 50205:fortytentytwentyty fifth
  • 50311:fortytentytwentyeleventy first
  • 50438:fortytentyfortythirty eighth
  • 50643:fortytentysixtyforty third
  • 51054:fortyeleventytyfifty fourth
  • 51361:fortytentytwelftysixteenty first
  • 51750:fortytentysixteentyfifteentieth
  • 52047:fortytwelftytyforty seventh
  • 52327:fortytwelftytwentytwelfty seventh
  • 52518:fortytwelftyfortyeleventy eighth
  • 52969:fortytwelftyeightysixteenty ninth
  • 53099:fortythirteentytyninety ninth
  • 53134:fortythirteentytythirteenty fourth
  • 53424:fortytwelftyfourteentytwenty fourth
  • 53636:fortytwelftysixteentythirty sixth
  • 53705:fortytwelftyseventeentyty fifth
  • 53982:fortytwelftyeighteentyeighteenty second
  • 53985:fortytwelftyeighteentyeighteenty fifth
  • 54382:fortyfourteentytwentyeighteenty second
  • 54591:fortyfourteentyfortynineteenty first
  • 54800:fortyfourteentyeightytieth
  • 55054:fortyfifteentytyfifty fourth
  • 55555:fortyfourteentyfourteentyfifteenty fifth
  • 55737:fortyfourteentysixteentythirteenty seventh
  • 56309:fortysixteentythirtyty ninth
  • 56542:fortysixteentyfortyfourteenty second
  • 56628:fortysixteentysixtytwenty eighth
  • 56758:fortysixteentysixtyfifteenty eighth
  • 56984:fortysixteentyeightyeighteenty fourth
  • 56994:fortysixteentyeightynineteenty fourth
  • 57008:fortyseventeentytyty eighth
  • 57909:fortysixteentynineteentyty ninth
  • 57938:fortysixteentyeighteentythirteenty eighth
  • 58279:fortyeighteentytwentyseventy ninth
  • 58417:fortyeighteentyfortyonety seventh
  • 59002:fortynineteentytyty second
  • 59026:fortynineteentytytwenty sixth
  • 59115:fortynineteentytyeleventy fifth
  • 59159:fortynineteentytyfifteenty ninth
  • 59236:fortyeighteentytwelftythirty sixth
  • 59796:fortyeighteentysixteentynineteenty sixth
  • 59976:fortyeighteentyeighteentyseventeenty sixth
  • 60125:sixtytytytwelfty fifth
  • 60451:sixtytyfortyfifty first
  • 60517:sixtytyfortyeleventy seventh
  • 60599:sixtytyfortynineteenty ninth
  • 61026:sixtyonetytytwenty sixth
  • 61168:sixtyonetytysixteenty eighth
  • 61580:sixtytyfourteentyeighteentieth
  • 61665:sixtytysixteentysixty fifth
  • 61703:sixtytyseventeentyty third
  • 62112:sixtytwentytyeleventy second
  • 63191:sixtythirtytynineteenty first
  • 63238:sixtytwentytwelftythirty eighth
  • 63279:sixtytwentytwelftyseventy ninth
  • 63315:sixtytwentytwelftyeleventy fifth
  • 63420:sixtytwentyfourteentytwentieth
  • 64325:sixtyfortytwentytwelfty fifth
  • 64845:sixtyfortyeightyforty fifth
  • 64990:sixtyfortyeightynineteentieth
  • 65194:sixtyfiftytynineteenty fourth
  • 65224:sixtyfortytwelftytwenty fourth
  • 65297:sixtyfortytwelftyninety seventh
  • 65633:sixtyfortysixteentythirty third
  • 65737:sixtyfortysixteentythirteenty seventh
  • 65928:sixtyfortyeighteentytwelfty eighth
  • 66001:sixtysixtytyty first
  • 66438:sixtysixtyfortythirty eighth
  • 66887:sixtysixtyeightyeighty seventh
  • 67004:sixtyseventytyty fourth
  • 67091:sixtyseventytyninety first
  • 67309:sixtysixtythirteentyty ninth
  • 67323:sixtysixtytwelftytwelfty third
  • 67356:sixtysixtytwelftyfifteenty sixth
  • 67376:sixtysixtytwelftyseventeenty sixth
  • 67468:sixtysixtyfourteentysixty eighth
  • 67632:sixtysixtysixteentythirty second
  • 67793:sixtysixtysixteentynineteenty third
  • 67908:sixtysixtynineteentyty eighth
  • 68636:sixtyeightysixtythirty sixth
  • 68638:sixtyeightysixtythirty eighth
  • 69579:sixtyeightyfourteentyseventeenty ninth
  • 69608:sixtyeightysixteentyty eighth
  • 69618:sixtyeightysixteentyonety eighth
  • 69870:sixtyeightyeighteentyseventieth
  • 70244:sixtytentytwentyforty fourth
  • 70378:sixtytentytwentyseventeenty eighth
  • 70943:sixtytentyeightyfourteenty third
  • 71015:sixtyeleventytyonety fifth
  • 71339:sixtytentytwelftythirteenty ninth
  • 71384:sixtytentytwelftyeighteenty fourth
  • 71739:sixtytentysixteentythirteenty ninth
  • 72006:sixtytwelftytyty sixth
  • 72120:sixtytwelftytytwelftieth
  • 72298:sixtytwelftytwentyninety eighth
  • 72300:sixtytwelftythirtytieth
  • 72311:sixtytwelftytwentyeleventy first
  • 72579:sixtytwelftyfortyseventeenty ninth
  • 72734:sixtytwelftysixtythirteenty fourth
  • 72832:sixtytwelftyeightythirty second
  • 72866:sixtytwelftyeightysixty sixth
  • 72954:sixtytwelftyeightyfifteenty fourth
  • 73014:sixtythirteentytyonety fourth
  • 73092:sixtythirteentytyninety second
  • 73242:sixtytwelftytwelftyforty second
  • 73300:sixtytwelftythirteentytieth
  • 73403:sixtytwelftyfourteentyty third
  • 73466:sixtytwelftyfourteentysixty sixth
  • 73692:sixtytwelftysixteentyninety second
  • 74022:sixtyfourteentytytwenty second
  • 74377:sixtyfourteentytwentyseventeenty seventh
  • 74422:sixtyfourteentyfortytwenty second
  • 74630:sixtyfourteentysixtythirtieth
  • 74666:sixtyfourteentysixtysixty sixth
  • 74950:sixtyfourteentyeightyfifteentieth
  • 74983:sixtyfourteentyeightyeighteenty third
  • 75030:sixtyfifteentytythirtieth
  • 75032:sixtyfifteentytythirty second
  • 75090:sixtyfifteentytyninetieth
  • 75296:sixtyfourteentytwelftyninety sixth
  • 75630:sixtyfourteentysixteentythirtieth
  • 76535:sixtysixteentyfortythirteenty fifth
  • 77117:sixtyseventeentytyeleventy seventh
  • 77204:sixtysixteentytwelftyty fourth
  • 77318:sixtysixteentytwelftyeleventy eighth
  • 77414:sixtysixteentyfourteentyonety fourth
  • 77882:sixtysixteentyeighteentyeighty second
  • 78250:sixtyeighteentytwentyfiftieth
  • 78280:sixtyeighteentytwentyeightieth
  • 78835:sixtyeighteentyeightythirty fifth
  • 78985:sixtyeighteentyeightyeighteenty fifth
  • 79490:sixtyeighteentyfourteentyninetieth
  • 79668:sixtyeighteentysixteentysixty eighth
  • 79909:sixtyeighteentynineteentyty ninth
  • 80050:eightytytyfiftieth
  • 80122:eightytytytwelfty second
  • 80125:eightytytytwelfty fifth
  • 80390:eightytytwentynineteentieth
  • 80522:eightytyfortytwelfty second
  • 80803:eightytyeightyty third
  • 80828:eightytyeightytwenty eighth
  • 80865:eightytyeightysixty fifth
  • 81346:eightytytwelftyfourteenty sixth
  • 81529:eightytyfourteentytwelfty ninth
  • 81970:eightytyeighteentyseventeentieth
  • 82227:eightytwentytwentytwenty seventh
  • 82838:eightytwentyeightythirty eighth
  • 83795:eightytwentysixteentynineteenty fifth
  • 83806:eightytwentyeighteentyty sixth
  • 83872:eightytwentyeighteentyseventy second
  • 84107:eightyfortyonetyty seventh
  • 84253:eightyfortytwentyfifty third
  • 84362:eightyfortytwentysixteenty second
  • 84511:eightyfortyfortyeleventy first
  • 84655:eightyfortysixtyfifty fifth
  • 84690:eightyfortysixtyninetieth
  • 84904:eightyfortyninetyty fourth
  • 84915:eightyfortyeightyeleventy fifth
  • 85011:eightyfiftytyonety first
  • 85106:eightyfortyeleventyty sixth
  • 85191:eightyfiftytynineteenty first
  • 85618:eightyfortysixteentyonety eighth
  • 85816:eightyfortyeighteentyonety sixth
  • 86036:eightysixtytythirty sixth
  • 86119:eightysixtytyeleventy ninth
  • 86807:eightysixtyeightyty seventh
  • 86835:eightysixtyeightythirty fifth
  • 87022:eightyseventytytwenty second
  • 87126:eightyseventytytwelfty sixth
  • 87467:eightysixtyfourteentysixty seventh
  • 87664:eightysixtysixteentysixty fourth
  • 87747:eightysixtysixteentyfourteenty seventh
  • 87810:eightysixtyeighteentyonetieth
  • 88575:eightyeightyfortyseventeenty fifth
  • 88581:eightyeightyfortyeighteenty first
  • 88910:eightyeightyeightyeleventieth
  • 88975:eightyeightyeightyseventeenty fifth
  • 88988:eightyeightyeightyeighteenty eighth
  • 89070:eightyninetytyseventieth
  • 89318:eightyeightytwelftyeleventy eighth
  • 89712:eightyeightysixteentyeleventy second
  • 90024:eightytentytytwenty fourth
  • 90093:eightytentytyninety third
  • 90321:eightytentytwentytwelfty first
  • 90347:eightytentytwentyfourteenty seventh
  • 90355:eightytentytwentyfifteenty fifth
  • 90565:eightytentyfortysixteenty fifth
  • 90593:eightytentyfortynineteenty third
  • 90654:eightytentysixtyfifty fourth
  • 91270:eightytentytwelftyseventieth
  • 91400:eightytentyfourteentytieth
  • 91668:eightytentysixteentysixty eighth
  • 91676:eightytentysixteentyseventy sixth
  • 91911:eightytentyeighteentyeleventy first
  • 91944:eightytentyeighteentyfourteenty fourth
  • 91973:eightytentyeighteentyseventeenty third
  • 92349:eightytwelftytwentyfourteenty ninth
  • 92474:eightytwelftyfortyseventy fourth
  • 92625:eightytwelftysixtytwenty fifth
  • 92803:eightytwelftyeightyty third
  • 92808:eightytwelftyeightyty eighth
  • 92907:eightytwelftyninetyty seventh
  • 92950:eightytwelftyeightyfifteentieth
  • 93070:eightythirteentytyseventieth
  • 93293:eightytwelftytwelftyninety third
  • 93352:eightytwelftytwelftyfifteenty second
  • 93454:eightytwelftyfourteentyfifty fourth
  • 93461:eightytwelftyfourteentysixty first
  • 93550:eightytwelftyfourteentyfifteentieth
  • 94035:eightyfourteentytythirty fifth
  • 94236:eightyfourteentytwentythirty sixth
  • 95046:eightyfifteentytyforty sixth
  • 95390:eightyfourteentytwelftynineteentieth
  • 95470:eightyfourteentyfourteentyseventieth
  • 95506:eightyfourteentyfifteentyty sixth
  • 95513:eightyfourteentyfourteentyeleventy third
  • 95523:eightyfourteentyfourteentytwelfty third
  • 96303:eightysixteentythirtyty third
  • 96306:eightysixteentythirtyty sixth
  • 96436:eightysixteentyfortythirty sixth
  • 96743:eightysixteentysixtyfourteenty third
  • 96807:eightysixteentyeightyty seventh
  • 97253:eightysixteentytwelftyfifty third
  • 97282:eightysixteentytwelftyeighty second
  • 97657:eightysixteentysixteentyfifty seventh
  • 97864:eightysixteentyeighteentysixty fourth
  • 98280:eightyeighteentytwentyeightieth
  • 98577:eightyeighteentyfortyseventeenty seventh
  • 98694:eightyeighteentysixtyninety fourth
  • 98762:eightyeighteentysixtysixteenty second
  • 98949:eightyeighteentyeightyfourteenty ninth
  • 99328:eightyeighteentytwelftytwelfty eighth
  • 99549:eightyeighteentyfourteentyfourteenty ninth
  • 99574:eightyeighteentyfourteentyseventeenty fourth
  • ```
  • ## Scoring
  • This is a [code golf challenge]. Your score is the number of bytes in your code.
  • > Explanations are optional, but I'm more likely to upvote answers that have one.
  • [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
  • In the fortieth century, matharchaeologists tried to reconstruct the [ordinal names for numbers](https://en.wikipedia.org/wiki/Ordinal_numeral) used in the twentieth century. They didn’t get all of them exactly correct, but they were close. Kind of.
  • Write code that takes a positive integer and outputs the reconstructed ordinal name.
  • ## Explanation
  • I considered including an algorithm in the challenge specification, but instead decided on just providing test cases and leaving this initially as an exercise in matharchaeology. If no correct answers arrive I will eventually post an answer of my own as an explanatory example, so feel free to wait until then if digging around in the data doesn’t appeal.
  • ## Input
  • - A positive integer from the test cases.
  • - You are not required to support any number not listed in the test cases. For these your code may do anything, including crash.
  • ## Output
  • - The corresponding string from the test cases.
  • - This must be in the exact format shown, including having spaces in and only in the specified places.
  • ## Example
  • Given input `263`:
  • - The correct output is `twentysixty third`.
  • - It is incorrect to output `twenty sixty third` (due to the extra space).
  • - It is incorrect to output `twentysixtythird` (due to the missing space).
  • ## Test cases
  • Test cases are in the format `input:output` where the input is a positive integer, and the output is made up solely of lower case letters and sometimes spaces.
  • There are 360 test cases, spread between 1, 2, 3, 4, and 5 digit inputs.
  • ```text
  • 1:first
  • 2:second
  • 3:third
  • 4:fourth
  • 5:fifth
  • 6:sixth
  • 7:seventh
  • 8:eighth
  • 9:ninth
  • 10:tenth
  • 11:eleventh
  • 12:twelfth
  • 13:thirteenth
  • 14:fourteenth
  • 15:fifteenth
  • 16:sixteenth
  • 17:seventeenth
  • 18:eighteenth
  • 19:nineteenth
  • 20:twentieth
  • 21:twenty first
  • 22:twenty second
  • 23:twenty third
  • 24:twenty fourth
  • 25:twenty fifth
  • 26:twenty sixth
  • 27:twenty seventh
  • 28:twenty eighth
  • 29:twenty ninth
  • 30:twenty tenth
  • 31:twenty eleventh
  • 32:twenty twelfth
  • 33:twenty thirteenth
  • 34:twenty fourteenth
  • 35:twenty fifteenth
  • 36:twenty sixteenth
  • 37:twenty seventeenth
  • 38:twenty eighteenth
  • 39:twenty nineteenth
  • 40:fortieth
  • 41:forty first
  • 43:forty third
  • 44:forty fourth
  • 45:forty fifth
  • 51:forty eleventh
  • 52:forty twelfth
  • 53:forty thirteenth
  • 54:forty fourteenth
  • 56:forty sixteenth
  • 57:forty seventeenth
  • 59:forty nineteenth
  • 60:sixtieth
  • 62:sixty second
  • 63:sixty third
  • 64:sixty fourth
  • 65:sixty fifth
  • 68:sixty eighth
  • 69:sixty ninth
  • 70:sixty tenth
  • 71:sixty eleventh
  • 73:sixty thirteenth
  • 74:sixty fourteenth
  • 75:sixty fifteenth
  • 76:sixty sixteenth
  • 77:sixty seventeenth
  • 78:sixty eighteenth
  • 82:eighty second
  • 83:eighty third
  • 86:eighty sixth
  • 90:eighty tenth
  • 97:eighty seventeenth
  • 98:eighty eighteenth
  • 102:tenty second
  • 103:tenty third
  • 105:tenty fifth
  • 106:tenty sixth
  • 112:tenty twelfth
  • 113:tenty thirteenth
  • 119:tenty nineteenth
  • 120:twelftieth
  • 122:twelfty second
  • 123:twelfty third
  • 130:twelfty tenth
  • 133:twelfty thirteenth
  • 137:twelfty seventeenth
  • 139:twelfty nineteenth
  • 140:fourteentieth
  • 154:fourteenty fourteenth
  • 156:fourteenty sixteenth
  • 177:sixteenty seventeenth
  • 178:sixteenty eighteenth
  • 186:eighteenty sixth
  • 188:eighteenty eighth
  • 189:eighteenty ninth
  • 193:eighteenty thirteenth
  • 194:eighteenty fourteenth
  • 208:twentyty eighth
  • 221:twentytwenty first
  • 223:twentytwenty third
  • 225:twentytwenty fifth
  • 226:twentytwenty sixth
  • 229:twentytwenty ninth
  • 238:twentytwenty eighteenth
  • 245:twentyforty fifth
  • 253:twentyforty thirteenth
  • 263:twentysixty third
  • 275:twentysixty fifteenth
  • 277:twentysixty seventeenth
  • 279:twentysixty nineteenth
  • 289:twentyeighty ninth
  • 307:twentytenty seventh
  • 312:twentytenty twelfth
  • 313:twentytenty thirteenth
  • 322:twentytwelfty second
  • 327:twentytwelfty seventh
  • 344:twentyfourteenty fourth
  • 345:twentyfourteenty fifth
  • 356:twentyfourteenty sixteenth
  • 363:twentysixteenty third
  • 364:twentysixteenty fourth
  • 384:twentyeighteenty fourth
  • 393:twentyeighteenty thirteenth
  • 397:twentyeighteenty seventeenth
  • 398:twentyeighteenty eighteenth
  • 401:fortyty first
  • 409:fortyty ninth
  • 410:fortyty tenth
  • 413:fortyty thirteenth
  • 443:fortyforty third
  • 444:fortyforty fourth
  • 462:fortysixty second
  • 463:fortysixty third
  • 464:fortysixty fourth
  • 465:fortysixty fifth
  • 487:fortyeighty seventh
  • 490:fortyeighty tenth
  • 503:fortytenty third
  • 521:fortytwelfty first
  • 540:fortyfourteentieth
  • 574:fortysixteenty fourteenth
  • 582:fortyeighteenty second
  • 585:fortyeighteenty fifth
  • 587:fortyeighteenty seventh
  • 599:fortyeighteenty nineteenth
  • 605:sixtyty fifth
  • 606:sixtyty sixth
  • 613:sixtyty thirteenth
  • 623:sixtytwenty third
  • 626:sixtytwenty sixth
  • 640:sixtyfortieth
  • 650:sixtyforty tenth
  • 658:sixtyforty eighteenth
  • 665:sixtysixty fifth
  • 669:sixtysixty ninth
  • 678:sixtysixty eighteenth
  • 693:sixtyeighty thirteenth
  • 699:sixtyeighty nineteenth
  • 708:sixtytenty eighth
  • 712:sixtytenty twelfth
  • 725:sixtytwelfty fifth
  • 729:sixtytwelfty ninth
  • 746:sixtyfourteenty sixth
  • 754:sixtyfourteenty fourteenth
  • 817:eightyty seventeenth
  • 823:eightytwenty third
  • 826:eightytwenty sixth
  • 871:eightysixty eleventh
  • 874:eightysixty fourteenth
  • 909:eightytenty ninth
  • 933:eightytwelfty thirteenth
  • 945:eightyfourteenty fifth
  • 983:eightyeighteenty third
  • 985:eightyeighteenty fifth
  • 1007:tentyty seventh
  • 1010:tentyty tenth
  • 1017:tentyty seventeenth
  • 1032:tentytwenty twelfth
  • 1046:tentyforty sixth
  • 1061:tentysixty first
  • 1142:tentyfourteenty second
  • 1153:tentyfourteenty thirteenth
  • 1179:tentysixteenty nineteenth
  • 1231:twelftytwenty eleventh
  • 1253:twelftyforty thirteenth
  • 1269:twelftysixty ninth
  • 1286:twelftyeighty sixth
  • 1293:twelftyeighty thirteenth
  • 1329:twelftytwelfty ninth
  • 1331:twelftytwelfty eleventh
  • 1447:fourteentyforty seventh
  • 1504:fourteentytenty fourth
  • 1510:fourteentytenty tenth
  • 1524:fourteentytwelfty fourth
  • 1551:fourteentyfourteenty eleventh
  • 1557:fourteentyfourteenty seventeenth
  • 1788:sixteentyeighteenty eighth
  • 1792:sixteentyeighteenty twelfth
  • 1828:eighteentytwenty eighth
  • 1860:eighteentysixtieth
  • 1873:eighteentysixty thirteenth
  • 1892:eighteentyeighty twelfth
  • 2081:twentytyeighty first
  • 2194:twentytyeighteenty fourteenth
  • 2311:twentytwentytenty eleventh
  • 2345:twentytwentyfourteenty fifth
  • 2517:twentyfortytenty seventeenth
  • 2547:twentyfortyfourteenty seventh
  • 2577:twentyfortysixteenty seventeenth
  • 2597:twentyfortyeighteenty seventeenth
  • 2644:twentysixtyforty fourth
  • 2684:twentysixtyeighty fourth
  • 2715:twentysixtytenty fifteenth
  • 2727:twentysixtytwelfty seventh
  • 2784:twentysixtyeighteenty fourth
  • 2881:twentyeightyeighty first
  • 2906:twentyeightytenty sixth
  • 2925:twentyeightytwelfty fifth
  • 2937:twentyeightytwelfty seventeenth
  • 3215:twentytwelftyty fifteenth
  • 3290:twentytwelftyeighty tenth
  • 3473:twentyfourteentysixty thirteenth
  • 3682:twentysixteentyeighty second
  • 3742:twentysixteentyfourteenty second
  • 3775:twentysixteentysixteenty fifteenth
  • 3791:twentysixteentyeighteenty eleventh
  • 3988:twentyeighteentyeighteenty eighth
  • 4036:fortytytwenty sixteenth
  • 4130:fortytytwelfty tenth
  • 4187:fortytyeighteenty seventh
  • 4364:fortytwentysixteenty fourth
  • 4420:fortyfortytwentieth
  • 4554:fortyfortyfourteenty fourteenth
  • 4569:fortyfortysixteenty ninth
  • 4709:fortysixtytenty ninth
  • 5202:fortytwelftyty second
  • 5538:fortyfourteentytwelfty eighteenth
  • 5682:fortysixteentyeighty second
  • 5720:fortysixteentytwelftieth
  • 6139:sixtytytwelfty nineteenth
  • 6149:sixtytyfourteenty ninth
  • 6451:sixtyfortyforty eleventh
  • 6487:sixtyfortyeighty seventh
  • 6563:sixtyfortysixteenty third
  • 6776:sixtysixtysixteenty sixteenth
  • 6894:sixtyeightyeighty fourteenth
  • 7009:sixtytentyty ninth
  • 7206:sixtytwelftyty sixth
  • 7267:sixtytwelftysixty seventh
  • 7686:sixtysixteentyeighty sixth
  • 7831:sixtyeighteentytwenty eleventh
  • 7956:sixtyeighteentyfourteenty sixteenth
  • 8213:eightytwentyty thirteenth
  • 8345:eightytwentyfourteenty fifth
  • 8446:eightyfortyforty sixth
  • 8506:eightyfortytenty sixth
  • 8873:eightyeightysixty thirteenth
  • 9034:eightytentytwenty fourteenth
  • 9106:eightytentytenty sixth
  • 9294:eightytwelftyeighty fourteenth
  • 9468:eightyfourteentysixty eighth
  • 9529:eightyfourteentytwelfty ninth
  • 9774:eightysixteentysixteenty fourteenth
  • 9886:eightyeighteentyeighty sixth
  • 10011:tentytyty eleventh
  • 10447:tentyfortyforty seventh
  • 10790:tentysixtyeighteenty tenth
  • 11296:tentytwelftyeighty sixteenth
  • 11472:tentyfourteentysixty twelfth
  • 12084:twelftytyeighty fourth
  • 12261:twelftytwentysixty first
  • 12328:twelftytwentytwelfty eighth
  • 12490:twelftyfortyeighty tenth
  • 13756:twelftysixteentyfourteenty sixteenth
  • 13858:twelftyeighteentyforty eighteenth
  • 14017:fourteentytyty seventeenth
  • 14047:fourteentytyforty seventh
  • 14132:fourteentytytwelfty twelfth
  • 14167:fourteentytysixteenty seventh
  • 14225:fourteentytwentytwenty fifth
  • 14912:fourteentyeightytenty twelfth
  • 15234:fourteentytwelftytwenty fourteenth
  • 15571:fourteentyfourteentysixteenty eleventh
  • 15665:fourteentysixteentysixty fifth
  • 15879:fourteentyeighteentysixty nineteenth
  • 15946:fourteentyeighteentyfourteenty sixth
  • 16120:sixteentytytwelftieth
  • 16164:sixteentytysixteenty fourth
  • 16493:sixteentyfortyeighty thirteenth
  • 17062:sixteentytentysixty second
  • 17067:sixteentytentysixty seventh
  • 17799:sixteentysixteentyeighteenty nineteenth
  • 17858:sixteentyeighteentyforty eighteenth
  • 18247:eighteentytwentyforty seventh
  • 19052:eighteentytentyforty twelfth
  • 19147:eighteentytentyfourteenty seventh
  • 19165:eighteentytentysixteenty fifth
  • 19181:eighteentytentyeighteenty first
  • 19817:eighteentyeighteentyty seventeenth
  • 19974:eighteentyeighteentysixteenty fourteenth
  • 20249:twentytytwentyforty ninth
  • 20574:twentytyfortysixteenty fourteenth
  • 20874:twentytyeightysixty fourteenth
  • 22169:twentytwentytysixteenty ninth
  • 22507:twentytwentyfortytenty seventh
  • 23032:twentytwentytentytwenty twelfth
  • 24004:twentyfortytyty fourth
  • 24202:twentyfortytwentyty second
  • 24522:twentyfortyfortytwelfty second
  • 26261:twentysixtytwentysixty first
  • 26308:twentysixtytwentytenty eighth
  • 26477:twentysixtyfortysixty seventeenth
  • 27973:twentysixtyeighteentysixteenty thirteenth
  • 27987:twentysixtyeighteentyeighteenty seventh
  • 28393:twentyeightytwentyeighteenty thirteenth
  • 28460:twentyeightyfortysixtieth
  • 28665:twentyeightysixtysixty fifth
  • 28864:twentyeightyeightysixty fourth
  • 29819:twentyeightyeighteentyty nineteenth
  • 30320:twentytentytwentytwelftieth
  • 31563:twentytentyfourteentysixteenty third
  • 32568:twentytwelftyfortysixteenty eighth
  • 32595:twentytwelftyfortyeighteenty fifteenth
  • 33321:twentytwelftytwelftytwelfty first
  • 33692:twentytwelftysixteentyeighty twelfth
  • 39060:twentyeighteentytentysixtieth
  • 39324:twentyeighteentytwelftytwelfty fourth
  • 39830:twentyeighteentyeighteentytwenty tenth
  • 40816:fortytyeightyty sixteenth
  • 41145:fortytytentyfourteenty fifth
  • 41586:fortytyfourteentyeighteenty sixth
  • 44591:fortyfortyfortyeighteenty eleventh
  • 45027:fortyfortytentytwenty seventh
  • 45112:fortyfortytentytenty twelfth
  • 56920:fortysixteentyeightytwelftieth
  • 57567:fortysixteentyfourteentysixteenty seventh
  • 58277:fortyeighteentytwentysixty seventeenth
  • 58746:fortyeighteentysixtyfourteenty sixth
  • 58965:fortyeighteentyeightysixteenty fifth
  • 61467:sixtytyfourteentysixty seventh
  • 62777:sixtytwentysixtysixteenty seventeenth
  • 63679:sixtytwentysixteentysixty nineteenth
  • 64764:sixtyfortysixtysixteenty fourth
  • 65875:sixtyfortyeighteentysixty fifteenth
  • 73195:sixtytwelftytentyeighteenty fifteenth
  • 74915:sixtyfourteentyeightytenty fifteenth
  • 75698:sixtyfourteentysixteentyeighty eighteenth
  • 76695:sixtysixteentysixtyeighty fifteenth
  • 78516:sixtyeighteentyfortytenty sixteenth
  • 79344:sixtyeighteentytwelftyfourteenty fourth
  • 80133:eightytytytwelfty thirteenth
  • 80579:eightytyfortysixteenty nineteenth
  • 81398:eightytytwelftyeighteenty eighteenth
  • 84430:eightyfortyfortytwenty tenth
  • 85730:eightyfortysixteentytwelfty tenth
  • 93333:eightytwelftytwelftytwelfty thirteenth
  • 94705:eightyfourteentysixtytenty fifth
  • 95727:eightyfourteentysixteentytwelfty seventh
  • 98275:eightyeighteentytwentysixty fifteenth
  • 98388:eightyeighteentytwentyeighteenty eighth
  • 98684:eightyeighteentysixtyeighty fourth
  • ```
  • ## Scoring
  • This is a [code golf challenge]. Your score is the number of bytes in your code.
  • > Explanations are optional, but I'm more likely to upvote answers that have one.
  • [code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"
#1: Initial revision by user avatar trichoplax‭ · 2025-04-15T02:01:55Z (7 days ago)
Awkward Ordinals
In the fortieth century, matharchaeologists tried to reconstruct the [ordinal names for numbers](https://en.wikipedia.org/wiki/Ordinal_numeral) used in the twentieth century. They didn’t get all of them exactly correct, but they were close. Kind of.

Write code that outputs the reconstructed ordinal name for any of the 468 test cases.

## Explanation
I considered including an algorithm in the challenge specification, but instead decided on leaving this initially as an exercise in matharchaeology. If no correct answers arrive I will eventually post an answer of my own as an explanatory example, so feel free to wait until then if digging around in the data doesn’t appeal.

## Input
- A number from the test cases.
- You are not required to support any number not listed in the test cases. For these your code may do anything, including crash.

## Output
- The corresponding string from the test cases.
- This must be in the exact format shown, including having spaces in and only in the specified places.

## Example
Given input `268`:
- The correct output is `twentysixty eighth`.
- It is incorrect to output `twenty sixty eighth`.
- It is incorrect to output `twentysixtyeighth`.

## Test cases
Test cases are in the format `input:output` where the input is a multidigit decimal positive whole number, and the output is made up solely of lower case letters and sometimes spaces.

```text
268:twentysixty eighth
353:twentyfifteenty third
511:fortyeleventy first
677:sixtyseventy seventh
850:eightyfiftieth
912:eightyeleventy second
1008:tentyty eighth
1173:tentyseventeenty third
1935:eighteentythirteenty fifth
2193:twentytynineteenty third
2268:twentytwentysixty eighth
2273:twentytwentyseventy third
2331:twentytwentythirteenty first
2606:twentysixtyty sixth
2853:twentyeightyfifty third
2885:twentyeightyeighty fifth
2994:twentyeightynineteenty fourth
2998:twentyeightynineteenty eighth
3016:twentytentyonety sixth
3185:twentytentyeighteenty fifth
3306:twentythirteentyty sixth
3549:twentyfourteentyfourteenty ninth
3662:twentysixteentysixty second
3676:twentysixteentyseventy sixth
3829:twentyeighteentytwenty ninth
3897:twentyeighteentyninety seventh
4901:fortyninetyty first
4936:fortyeightythirteenty sixth
4950:fortyeightyfifteentieth
4992:fortyeightynineteenty second
5380:fortytwelftyeighteentieth
5462:fortyfourteentysixty second
5515:fortyfourteentyeleventy fifth
5632:fortysixteentythirty second
5663:fortysixteentysixty third
6009:sixtytyty ninth
6084:sixtytyeighty fourth
6341:sixtytwentyfourteenty first
6578:sixtyfortyseventeenty eighth
7462:sixtyfourteentysixty second
7509:sixtyfifteentyty ninth
7896:sixtyeighteentyninety sixth
7928:sixtyeighteentytwelfty eighth
8059:eightytyfifty ninth
8119:eightytyeleventy ninth
8218:eightytwentyonety eighth
8264:eightytwentysixty fourth
8351:eightytwentyfifteenty first
8733:eightysixtythirteenty third
8788:eightysixtyeighteenty eighth
8845:eightyeightyforty fifth
9366:eightytwelftysixteenty sixth
9424:eightyfourteentytwenty fourth
9464:eightyfourteentysixty fourth
9492:eightyfourteentyninety second
9554:eightyfourteentyfifteenty fourth
9621:eightysixteentytwenty first
9648:eightysixteentyforty eighth
9891:eightyeighteentyninety first
11000:eleventytytieth
11118:eleventytyeleventy eighth
11317:tentytwelftyeleventy seventh
11419:tentyfourteentyonety ninth
11939:tentyeighteentythirteenty ninth
12057:twelftytyfifty seventh
12480:twelftyfortyeightieth
12789:twelftysixtyeighteenty ninth
12864:twelftyeightysixty fourth
13213:twelftytwelftyonety third
13287:twelftytwelftyeighty seventh
13388:twelftytwelftyeighteenty eighth
13580:twelftyfourteentyeighteentieth
13726:twelftysixteentytwelfty sixth
14043:fourteentytyforty third
15095:fifteentytyninety fifth
15178:fifteentytyseventeenty eighth
15444:fourteentyfourteentyforty fourth
15533:fourteentyfourteentythirteenty third
15652:fourteentysixteentyfifty second
15851:fourteentyeighteentyfifty first
15872:fourteentyeighteentyseventy second
15971:fourteentyeighteentyseventeenty first
16372:sixteentytwentyseventeenty second
16502:sixteentyfiftyty second
16843:sixteentyeightyforty third
17022:seventeentytytwenty second
17657:sixteentysixteentyfifty seventh
17840:sixteentyeighteentyfortieth
17954:sixteentyeighteentyfifteenty fourth
18162:eighteentytysixteenty second
18289:eighteentytwentyeighty ninth
18455:eighteentyfortyfifty fifth
18486:eighteentyfortyeighty sixth
18510:eighteentyfortyeleventieth
18570:eighteentyfortyseventeentieth
18621:eighteentysixtytwenty first
18718:eighteentysixtyeleventy eighth
19116:nineteentytyeleventy sixth
19252:eighteentytwelftyfifty second
19361:eighteentytwelftysixteenty first
19580:eighteentyfourteentyeighteentieth
19798:eighteentysixteentynineteenty eighth
19802:eighteentyeighteentyty second
19977:eighteentyeighteentyseventeenty seventh
20011:twentytytyonety first
20092:twentytytyninety second
20114:twentytytyeleventy fourth
20499:twentytyfortyninety ninth
20628:twentytysixtytwenty eighth
20654:twentytysixtyfifty fourth
20731:twentytysixtythirteenty first
20819:twentytyeightyonety ninth
20962:twentytyeightysixteenty second
20989:twentytyeightyeighteenty ninth
21051:twentyonetytyfifty first
21162:twentyonetytysixteenty second
21303:twentytythirteentyty third
21460:twentytyfourteentysixtieth
21491:twentytyfourteentyninety first
21531:twentytyfourteentythirteenty first
21710:twentytysixteentyeleventieth
23165:twentythirtytysixteenty fifth
23335:twentytwentytwelftythirteenty fifth
23603:twentytwentysixteentyty third
23878:twentytwentyeighteentyseventy eighth
23880:twentytwentyeighteentyeightieth
24227:twentyfortytwentytwenty seventh
24508:twentyfortyfiftyty eighth
24693:twentyfortysixtyninety third
24702:twentyfortyseventyty second
24749:twentyfortysixtyfourteenty ninth
24835:twentyfortyeightythirty fifth
24856:twentyfortyeightyfifty sixth
25216:twentyfortytwelftyonety sixth
25347:twentyfortytwelftyfourteenty seventh
25430:twentyfortyfourteentythirtieth
25579:twentyfortyfourteentyseventeenty ninth
25979:twentyfortyeighteentyseventeenty ninth
26359:twentysixtytwentyfifteenty ninth
26381:twentysixtytwentyeighteenty first
26528:twentysixtyfortytwelfty eighth
26854:twentysixtyeightyfifty fourth
27258:twentysixtytwelftyfifty eighth
27361:twentysixtytwelftysixteenty first
27370:twentysixtytwelftyseventeentieth
28088:twentyeightytyeighty eighth
28404:twentyeightyfortyty fourth
28831:twentyeightyeightythirty first
30042:twentytentytyforty second
30073:twentytentytyseventy third
30165:twentytentytysixteenty fifth
30350:twentytentytwentyfifteentieth
30640:twentytentysixtyfortieth
30807:twentytentyeightyty seventh
32197:twentytwelftytynineteenty seventh
32207:twentytwelftytwentyty seventh
33065:twentythirteentytysixty fifth
33528:twentytwelftyfourteentytwelfty eighth
33789:twentytwelftysixteentyeighteenty ninth
34292:twentyfourteentytwentyninety second
34633:twentyfourteentysixtythirty third
34732:twentyfourteentysixtythirteenty second
35113:twentyfifteentytyeleventy third
35475:twentyfourteentyfourteentyseventy fifth
35608:twentyfourteentysixteentyty eighth
35928:twentyfourteentyeighteentytwelfty eighth
36796:twentysixteentysixtynineteenty sixth
37205:twentysixteentytwelftyty fifth
37398:twentysixteentytwelftynineteenty eighth
37950:twentysixteentyeighteentyfifteentieth
38032:twentyeighteentytythirty second
38414:twentyeighteentyfortyonety fourth
38436:twentyeighteentyfortythirty sixth
38474:twentyeighteentyfortyseventy fourth
38716:twentyeighteentysixtyeleventy sixth
38729:twentyeighteentysixtytwelfty ninth
38940:twentyeighteentyeightyfourteentieth
39144:twentynineteentytyfourteenty fourth
40003:fortytytyty third
40055:fortytytyfifty fifth
40511:fortytyfortyeleventy first
40841:fortytyeightyforty first
41047:fortyonetytyforty seventh
41055:fortyonetytyfifty fifth
41349:fortytytwelftyfourteenty ninth
41936:fortytyeighteentythirteenty sixth
42301:fortytwentythirtyty first
42432:fortytwentyfortythirty second
42552:fortytwentyfortyfifteenty second
42620:fortytwentysixtytwentieth
42669:fortytwentysixtysixty ninth
43376:fortytwentytwelftyseventeenty sixth
43510:fortytwentyfourteentyeleventieth
43552:fortytwentyfourteentyfifteenty second
43759:fortytwentysixteentyfifteenty ninth
43804:fortytwentyeighteentyty fourth
43899:fortytwentyeighteentyninety ninth
43934:fortytwentyeighteentythirteenty fourth
43973:fortytwentyeighteentyseventeenty third
44337:fortyfortytwentythirteenty seventh
44548:fortyfortyfortyfourteenty eighth
44867:fortyfortyeightysixty seventh
44877:fortyfortyeightyseventy seventh
45180:fortyfiftytyeighteentieth
45601:fortyfortysixteentyty first
45686:fortyfortysixteentyeighty sixth
46248:fortysixtytwentyforty eighth
46369:fortysixtytwentysixteenty ninth
46393:fortysixtytwentynineteenty third
46720:fortysixtysixtytwelftieth
46948:fortysixtyeightyfourteenty eighth
47044:fortyseventytyforty fourth
47069:fortyseventytysixty ninth
47227:fortysixtytwelftytwenty seventh
47335:fortysixtytwelftythirteenty fifth
47378:fortysixtytwelftyseventeenty eighth
47793:fortysixtysixteentynineteenty third
47960:fortysixtyeighteentysixteentieth
48144:fortyeightytyfourteenty fourth
48154:fortyeightytyfifteenty fourth
48175:fortyeightytyseventeenty fifth
48189:fortyeightytyeighteenty ninth
48224:fortyeightytwentytwenty fourth
48291:fortyeightytwentyninety first
48565:fortyeightyfortysixteenty fifth
48738:fortyeightysixtythirteenty eighth
48776:fortyeightysixtyseventeenty sixth
48829:fortyeightyeightytwenty ninth
49038:fortyninetytythirty eighth
49044:fortyninetytyforty fourth
49095:fortyninetytyninety fifth
49485:fortyeightyfourteentyeighty fifth
49679:fortyeightysixteentyseventy ninth
49733:fortyeightysixteentythirteenty third
50205:fortytentytwentyty fifth
50311:fortytentytwentyeleventy first
50438:fortytentyfortythirty eighth
50643:fortytentysixtyforty third
51054:fortyeleventytyfifty fourth
51361:fortytentytwelftysixteenty first
51750:fortytentysixteentyfifteentieth
52047:fortytwelftytyforty seventh
52327:fortytwelftytwentytwelfty seventh
52518:fortytwelftyfortyeleventy eighth
52969:fortytwelftyeightysixteenty ninth
53099:fortythirteentytyninety ninth
53134:fortythirteentytythirteenty fourth
53424:fortytwelftyfourteentytwenty fourth
53636:fortytwelftysixteentythirty sixth
53705:fortytwelftyseventeentyty fifth
53982:fortytwelftyeighteentyeighteenty second
53985:fortytwelftyeighteentyeighteenty fifth
54382:fortyfourteentytwentyeighteenty second
54591:fortyfourteentyfortynineteenty first
54800:fortyfourteentyeightytieth
55054:fortyfifteentytyfifty fourth
55555:fortyfourteentyfourteentyfifteenty fifth
55737:fortyfourteentysixteentythirteenty seventh
56309:fortysixteentythirtyty ninth
56542:fortysixteentyfortyfourteenty second
56628:fortysixteentysixtytwenty eighth
56758:fortysixteentysixtyfifteenty eighth
56984:fortysixteentyeightyeighteenty fourth
56994:fortysixteentyeightynineteenty fourth
57008:fortyseventeentytyty eighth
57909:fortysixteentynineteentyty ninth
57938:fortysixteentyeighteentythirteenty eighth
58279:fortyeighteentytwentyseventy ninth
58417:fortyeighteentyfortyonety seventh
59002:fortynineteentytyty second
59026:fortynineteentytytwenty sixth
59115:fortynineteentytyeleventy fifth
59159:fortynineteentytyfifteenty ninth
59236:fortyeighteentytwelftythirty sixth
59796:fortyeighteentysixteentynineteenty sixth
59976:fortyeighteentyeighteentyseventeenty sixth
60125:sixtytytytwelfty fifth
60451:sixtytyfortyfifty first
60517:sixtytyfortyeleventy seventh
60599:sixtytyfortynineteenty ninth
61026:sixtyonetytytwenty sixth
61168:sixtyonetytysixteenty eighth
61580:sixtytyfourteentyeighteentieth
61665:sixtytysixteentysixty fifth
61703:sixtytyseventeentyty third
62112:sixtytwentytyeleventy second
63191:sixtythirtytynineteenty first
63238:sixtytwentytwelftythirty eighth
63279:sixtytwentytwelftyseventy ninth
63315:sixtytwentytwelftyeleventy fifth
63420:sixtytwentyfourteentytwentieth
64325:sixtyfortytwentytwelfty fifth
64845:sixtyfortyeightyforty fifth
64990:sixtyfortyeightynineteentieth
65194:sixtyfiftytynineteenty fourth
65224:sixtyfortytwelftytwenty fourth
65297:sixtyfortytwelftyninety seventh
65633:sixtyfortysixteentythirty third
65737:sixtyfortysixteentythirteenty seventh
65928:sixtyfortyeighteentytwelfty eighth
66001:sixtysixtytyty first
66438:sixtysixtyfortythirty eighth
66887:sixtysixtyeightyeighty seventh
67004:sixtyseventytyty fourth
67091:sixtyseventytyninety first
67309:sixtysixtythirteentyty ninth
67323:sixtysixtytwelftytwelfty third
67356:sixtysixtytwelftyfifteenty sixth
67376:sixtysixtytwelftyseventeenty sixth
67468:sixtysixtyfourteentysixty eighth
67632:sixtysixtysixteentythirty second
67793:sixtysixtysixteentynineteenty third
67908:sixtysixtynineteentyty eighth
68636:sixtyeightysixtythirty sixth
68638:sixtyeightysixtythirty eighth
69579:sixtyeightyfourteentyseventeenty ninth
69608:sixtyeightysixteentyty eighth
69618:sixtyeightysixteentyonety eighth
69870:sixtyeightyeighteentyseventieth
70244:sixtytentytwentyforty fourth
70378:sixtytentytwentyseventeenty eighth
70943:sixtytentyeightyfourteenty third
71015:sixtyeleventytyonety fifth
71339:sixtytentytwelftythirteenty ninth
71384:sixtytentytwelftyeighteenty fourth
71739:sixtytentysixteentythirteenty ninth
72006:sixtytwelftytyty sixth
72120:sixtytwelftytytwelftieth
72298:sixtytwelftytwentyninety eighth
72300:sixtytwelftythirtytieth
72311:sixtytwelftytwentyeleventy first
72579:sixtytwelftyfortyseventeenty ninth
72734:sixtytwelftysixtythirteenty fourth
72832:sixtytwelftyeightythirty second
72866:sixtytwelftyeightysixty sixth
72954:sixtytwelftyeightyfifteenty fourth
73014:sixtythirteentytyonety fourth
73092:sixtythirteentytyninety second
73242:sixtytwelftytwelftyforty second
73300:sixtytwelftythirteentytieth
73403:sixtytwelftyfourteentyty third
73466:sixtytwelftyfourteentysixty sixth
73692:sixtytwelftysixteentyninety second
74022:sixtyfourteentytytwenty second
74377:sixtyfourteentytwentyseventeenty seventh
74422:sixtyfourteentyfortytwenty second
74630:sixtyfourteentysixtythirtieth
74666:sixtyfourteentysixtysixty sixth
74950:sixtyfourteentyeightyfifteentieth
74983:sixtyfourteentyeightyeighteenty third
75030:sixtyfifteentytythirtieth
75032:sixtyfifteentytythirty second
75090:sixtyfifteentytyninetieth
75296:sixtyfourteentytwelftyninety sixth
75630:sixtyfourteentysixteentythirtieth
76535:sixtysixteentyfortythirteenty fifth
77117:sixtyseventeentytyeleventy seventh
77204:sixtysixteentytwelftyty fourth
77318:sixtysixteentytwelftyeleventy eighth
77414:sixtysixteentyfourteentyonety fourth
77882:sixtysixteentyeighteentyeighty second
78250:sixtyeighteentytwentyfiftieth
78280:sixtyeighteentytwentyeightieth
78835:sixtyeighteentyeightythirty fifth
78985:sixtyeighteentyeightyeighteenty fifth
79490:sixtyeighteentyfourteentyninetieth
79668:sixtyeighteentysixteentysixty eighth
79909:sixtyeighteentynineteentyty ninth
80050:eightytytyfiftieth
80122:eightytytytwelfty second
80125:eightytytytwelfty fifth
80390:eightytytwentynineteentieth
80522:eightytyfortytwelfty second
80803:eightytyeightyty third
80828:eightytyeightytwenty eighth
80865:eightytyeightysixty fifth
81346:eightytytwelftyfourteenty sixth
81529:eightytyfourteentytwelfty ninth
81970:eightytyeighteentyseventeentieth
82227:eightytwentytwentytwenty seventh
82838:eightytwentyeightythirty eighth
83795:eightytwentysixteentynineteenty fifth
83806:eightytwentyeighteentyty sixth
83872:eightytwentyeighteentyseventy second
84107:eightyfortyonetyty seventh
84253:eightyfortytwentyfifty third
84362:eightyfortytwentysixteenty second
84511:eightyfortyfortyeleventy first
84655:eightyfortysixtyfifty fifth
84690:eightyfortysixtyninetieth
84904:eightyfortyninetyty fourth
84915:eightyfortyeightyeleventy fifth
85011:eightyfiftytyonety first
85106:eightyfortyeleventyty sixth
85191:eightyfiftytynineteenty first
85618:eightyfortysixteentyonety eighth
85816:eightyfortyeighteentyonety sixth
86036:eightysixtytythirty sixth
86119:eightysixtytyeleventy ninth
86807:eightysixtyeightyty seventh
86835:eightysixtyeightythirty fifth
87022:eightyseventytytwenty second
87126:eightyseventytytwelfty sixth
87467:eightysixtyfourteentysixty seventh
87664:eightysixtysixteentysixty fourth
87747:eightysixtysixteentyfourteenty seventh
87810:eightysixtyeighteentyonetieth
88575:eightyeightyfortyseventeenty fifth
88581:eightyeightyfortyeighteenty first
88910:eightyeightyeightyeleventieth
88975:eightyeightyeightyseventeenty fifth
88988:eightyeightyeightyeighteenty eighth
89070:eightyninetytyseventieth
89318:eightyeightytwelftyeleventy eighth
89712:eightyeightysixteentyeleventy second
90024:eightytentytytwenty fourth
90093:eightytentytyninety third
90321:eightytentytwentytwelfty first
90347:eightytentytwentyfourteenty seventh
90355:eightytentytwentyfifteenty fifth
90565:eightytentyfortysixteenty fifth
90593:eightytentyfortynineteenty third
90654:eightytentysixtyfifty fourth
91270:eightytentytwelftyseventieth
91400:eightytentyfourteentytieth
91668:eightytentysixteentysixty eighth
91676:eightytentysixteentyseventy sixth
91911:eightytentyeighteentyeleventy first
91944:eightytentyeighteentyfourteenty fourth
91973:eightytentyeighteentyseventeenty third
92349:eightytwelftytwentyfourteenty ninth
92474:eightytwelftyfortyseventy fourth
92625:eightytwelftysixtytwenty fifth
92803:eightytwelftyeightyty third
92808:eightytwelftyeightyty eighth
92907:eightytwelftyninetyty seventh
92950:eightytwelftyeightyfifteentieth
93070:eightythirteentytyseventieth
93293:eightytwelftytwelftyninety third
93352:eightytwelftytwelftyfifteenty second
93454:eightytwelftyfourteentyfifty fourth
93461:eightytwelftyfourteentysixty first
93550:eightytwelftyfourteentyfifteentieth
94035:eightyfourteentytythirty fifth
94236:eightyfourteentytwentythirty sixth
95046:eightyfifteentytyforty sixth
95390:eightyfourteentytwelftynineteentieth
95470:eightyfourteentyfourteentyseventieth
95506:eightyfourteentyfifteentyty sixth
95513:eightyfourteentyfourteentyeleventy third
95523:eightyfourteentyfourteentytwelfty third
96303:eightysixteentythirtyty third
96306:eightysixteentythirtyty sixth
96436:eightysixteentyfortythirty sixth
96743:eightysixteentysixtyfourteenty third
96807:eightysixteentyeightyty seventh
97253:eightysixteentytwelftyfifty third
97282:eightysixteentytwelftyeighty second
97657:eightysixteentysixteentyfifty seventh
97864:eightysixteentyeighteentysixty fourth
98280:eightyeighteentytwentyeightieth
98577:eightyeighteentyfortyseventeenty seventh
98694:eightyeighteentysixtyninety fourth
98762:eightyeighteentysixtysixteenty second
98949:eightyeighteentyeightyfourteenty ninth
99328:eightyeighteentytwelftytwelfty eighth
99549:eightyeighteentyfourteentyfourteenty ninth
99574:eightyeighteentyfourteentyseventeenty fourth
```

## Scoring
This is a [code golf challenge]. Your score is the number of bytes in your code.

> Explanations are optional, but I'm more likely to upvote answers that have one.


[code golf challenge]: https://codegolf.codidact.com/categories/49/tags/4274 "The code-golf tag"