about | help | code help+videos | done | prefs |
Write a method that returns an array of the sequence of "strange numbers" starting with the given 'startNum' and including all the "strange numbers" up to a total of 'maxCount' of them. So, WHAT is a "strange number"??? To find the next "strange number" in the sequence of "strange numbers" you add up all the letters in the names of the digits of the number. For example, 782 has a "strange number" of 13 because SEVEN has 5 letters, EIGHT has 5 letters, and TWO has 3 letter. Therefore, since 5+5+3=13, the "strange number" for 782 is 13. To find the next number in the sequence, you would now add up all the letters in ONE and THREE getting 3+5=8. Then EIGHT has 5 letters, and FIVE has 4 letters. After that you keep getting 4 because FOUR has 4 letters. test2025_05_22_P1SL_strangeNumbers(123456789, 12) → [123456789, 36, 8, 5, 4, 4, 4, 4, 4, 4, 4, 4] test2025_05_22_P1SL_strangeNumbers(55555, 10) → [55555, 20, 7, 5, 4, 4, 4, 4, 4, 4] test2025_05_22_P1SL_strangeNumbers(57858, 10) → [57858, 23, 8, 5, 4, 4, 4, 4, 4, 4] ...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: 260
Copyright Nick Parlante 2017 - privacy