Troll counting
Statement
The program:
As Terry Pratchett explains in Men At Arms:
"Trolls traditionally count like this: (...) one, two, three... many (...) many-one, many-two, many-three, many-many, many-many-one, many-many-two, many-many-three, many-many-many, many-many-many-one, many-many-many-two, many-many-many-three, LOTS."
From there we can extrapolate a the following extra rules:
- after LOTS comes LOTS-one then LOTS-two and so on
- after LOTS-many-many-many-three comes LOTS-LOTS, then LOTS-LOTS-one, and so on
- after LOTS-LOTS-LOTS-many-many-many-three comes LOTS-LOTS-LOTS-LOTS, then LOTS-LOTS-LOTS-LOTS-one and so on (because trolls' imagination only gets them so far)
Given a number, your program must simply output the troll version of it.
"Trolls traditionally count like this: (...) one, two, three... many (...) many-one, many-two, many-three, many-many, many-many-one, many-many-two, many-many-three, many-many-many, many-many-many-one, many-many-many-two, many-many-many-three, LOTS."
From there we can extrapolate a the following extra rules:
- after LOTS comes LOTS-one then LOTS-two and so on
- after LOTS-many-many-many-three comes LOTS-LOTS, then LOTS-LOTS-one, and so on
- after LOTS-LOTS-LOTS-many-many-many-three comes LOTS-LOTS-LOTS-LOTS, then LOTS-LOTS-LOTS-LOTS-one and so on (because trolls' imagination only gets them so far)
Given a number, your program must simply output the troll version of it.
INPUT:
Line 1: a single number N
OUTPUT:
Line 1: the troll version of N
CONSTRAINTS:
1<=N<=1000
EXAMPLE:
Input
1
Output
one
Game modes
Fastest, Shortest, Reverse
Test cases
One Test
Input
1
Output
one
Validator 1 Validator
Input
2
Output
two
Many Test
Input
4
Output
many
Validator 2 Validator
Input
5
Output
many-one
A bit more Test
Input
7
Output
many-three
Validator 3 Validator
Input
6
Output
many-two
Many manies Test
Input
8
Output
many-many
Validator 4 Validator
Input
9
Output
many-many-one
LOTS Test
Input
16
Output
LOTS
Validator 5 Validator
Input
22
Output
LOTS-many-two
Many lots Test
Input
34
Output
LOTS-LOTS-two
Validator 6 Validator
Input
45
Output
LOTS-LOTS-many-many-many-one
Gosh, that's a lot of lots Test
Input
989
Output
LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-many-many-many-one
Validator 7 Validator
Input
991
Output
LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-LOTS-many-many-many-three
Solution language
Solution
Stub generator input