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.
Oh, someone who gets it.
Anyway, it seems you are wrong: the countless explanations from the author and from many other users explain that on an every New Years night, some festivities in the town are held which cause that every not fully developed citizen ceases to contribute to the next year's population. People gather around a big bonfire and perform some... customs, chanting: "there is no fractional people at the end of a year! there's no fractional people..." As a big fan of Silent Hill, Twin Peaks, and "The Village", I like this explanation a lot.
Just think of it as a custom of the town's community, incorporate it into your solution, and you will pass no problem. As they say, "In
SileRome do as Romans do" .@Chrono79 the logic is wrong. If 0.4 represents a baby, then even if you don't count it NOW, you must count it once it reaches 1.0. By rounding down, you're literally eliminating real values—and that's incorrect.
If you want to round down, I see two options:
This comment is hidden because it contains spoiler information about the solution
And what if we count every month instead of year, more unborn babies being thrown out of the equation. Let's count every single second, your answer will always be 0. What kind of algorithm has a different outcome depending on the observation period being chosen? :/
No, you can think of fractional people as unborn babies, they're still not born so you should not count them. If you think how population grows, it makes much more sense, because people doesn't grow an extra pair of limbs, right? And even if that would happen, you'll still count that as a single person.
This comment is hidden because it contains spoiler information about the solution
Show some demographic data where there are populations with not integer numbers if you want to prove your point.
lmao
The answer is to divide by 2, if the remainder is 1, then it is odd, and if the remainder is 0, it is even
It's too coooool!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
agree
Yes,
10
has two digits, so you need to continue until you arrive to a single-digit value.Incorrect answer for n=10: expected 10 to equal 1 Completed in 2ms Should pass random tests Incorrect answer for n=563527: expected 10 to equal 1
10
is not a single-digit number? Is it should next10 --> 1 + 0 = 1
? Is a test case error ??Loading more items...