Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Please look at my post just below.
They are wrong. These "top" solutions passed until I added that test you mention and which was asked by some people (you can see corresponding posts below - again below..., sorry: I can't reproduce all posts... -).
I thought it was my code but ---> read on ...
However, I got 'one of the top answers' to this kata and passed it through and guess what? it failed on exactly the same test and got exactly the same answer as mine.If in doubt grab code from my section 'solutions' and run both sets and see for yourself.
I point you to this test with inputs ---> 1000 2.0 50 and 1214
comes back as 'should be 4' however both highest ranked solution and mine both say 3.
Small point but I think it will cause alot of people issues with this Kata. I respectfully submit that this should be looked into when people have time. Thank you.
When tests were updated and Python 3.8 enabled some old solutions that should have been invalidated were not; might be because there are too many solutions in that kata for the CW process?
Isn't there a way to fix the fact that there are katas on this site that have solutions that literally do not work anymore?
Either we find out there should have been more tests to properly test the description, so tests are added and solutions that no longer pass are deleted. This seems like the best choice.
Or just roll with it and change the description to allow for that.
But not option 3, where we add tests later and leave old solutions up. The top solution on this kata literally doesn't work. Seems annoying if someone gives up (perhaps because he had problem with new tests) and the top solution just has same problem as they did.
Not sure if author can do something with this, but just seems like a scenario that shouldn't be on the site at all.
This comment is hidden because it contains spoiler information about the solution
It's not that obvious, at least not to me. When working with discretes and a continious function, should you round at any intermediate step or only at the end result?
In this kata, the former is chosen. I think the better option would be the latter, as it avoids a piling up of truncation errors by discretization.
Let's say I go to the hair dresser once every two weeks. This means I go on average 0.5 times/week. If I were to truncate to the nearest integer every week, I would never go to the hair dresser at all.
You're not taking into account compound population increase each year. That 175 increase is only the first year, not every year. The following year would be (((1500 + 175)*5%) + 100)= 183ish, and so on.
It's not clear, and I needed the hint, but in hindsight it should be obvious that you don't have fractions of humans. (hopefully)
This comment is hidden because it contains spoiler information about the solution
Mark your code as a spoiler.
I'm having the same problem. Only one test case failed. I have no idea what I'm doing wrong.
I tried your solution that did not fail that test: you pass that test but fail another one, always the same.
When reporting a problem think to give the input.
Julialang test bug
fixed tests
Log
Actual 15
Expect 15