about | help | code help+videos | done | prefs |
Blackhole 123. The number 123 is a mathemagical black hole using the count & concatenate process. Example: Count the number of even digits. The number 123 has 1 even digit. Count the number of odd digits. The number 123 has 2 odd digits. Count the total number of digits. The number 123 has 3 digits. Concatenate the 3 numbers in the order: even, odd, and # of digits and get 123. Start with any natural number, apply the count and concatenate process repeatedly, and you will end up in black hole 123. Write a program to accept natural number and return the number of iterations of the process to reach the black hole 123. BlackHole(123) → 0 BlackHole(235) → 1 BlackHole(31416) → 2 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 160 Post-solution available
Copyright Nick Parlante 2017 - privacy