• ###### thundreecommented on "count '9's from 1 to n" kata

Yes I see, and I really appreciate you taking time to check this kata, but I'm really strugging to believe that there are 10000000000x "9"s under N = 10000000000. Like, where are the other numbers like 0 to 8?
It's just a sampe test, maybe a mistake when copy and pasting, I don't know...
But ok, I'll take your word and work it out!

Thank you for your time!

• ###### Chrono79commented on "count '9's from 1 to n" kata

Check the sample tests:

``````Test.assertEquals(number9(1), 0, 'Nein!')
Test.assertEquals(number9(9), 1, 'Nein!')                       // 1/9
Test.assertEquals(number9(100), 20, 'Nein!')                    // 20/100 = 1/5
Test.assertEquals(number9(565754),275645, 'Nein!')              // 275645/565754 almost 1/2
Test.assertEquals(number9(10000000000),10000000000, 'Nein!')    // 1
``````

Do you see how the relation grows? And numbers with more than a single 9, count as the numbers of nines in them.

• ###### thundreecommented on "count '9's from 1 to n" kata

I think there is no way, if we are counting 9s under N, there is no way that any number N > 9 will be it's own answer.
For example, there are 20x "9"s under N = 100 and there is 40x "9"s under N = 200
So, there is no way that there are 10000000000x "9"s under N = 10000000000

• ###### Chrono79commented on "count '9's from 1 to n" kata

Couldn't it be that for exactly that value of n the answer is n too?

• ###### thundreecommented on "count '9's from 1 to n" kata

Oh, I got it, there is a test sample line that is wrong. Probably the random tests are good. I'll just comment that code line.

• ###### Chrono79commented on "count '9's from 1 to n" kata

And why do you think it's wrong? There are a lot of nines there and you have to sum them all up to n.

• ###### thundreecommented on "count '9's from 1 to n" kata

No problem: In this example I just returned the variable "n" that was given to solve.

https://imgur.com/CL292yY

• ###### Chrono79resolved an issue on "count '9's from 1 to n" kata

It's been solved 142 times in javascript, if you think some test is wrong, provide some evidence.

explain

• ###### thundreecreated an issue for "count '9's from 1 to n" kata

Hey Guys, I think the Javascript version of this Kata is broken. Some tests CLEARLY ask for the wrong values, making it impossible to complete. Can someone validate, please?

Done

• ###### docgunthropcommented on "count '9's from 1 to n" kata

Any power users available to approve this translation during @ransy's absence?

• ###### docgunthropcreated a suggestion for "count '9's from 1 to n" kata

Elixir translation awaiting approval. This includes `20` random tests whereas the original JS kata only has `3` random tests.

• ###### Voilecreated an issue for "count '9's from 1 to n" kata

This comment is hidden because it contains spoiler information about the solution