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.
I mainly meant efficient in the code golf sense of not requiring many characters. :) Yes, the floor division method is more performant.
Omg. Of course. I'm an idiot. XD
Thanks for the feedback! I updated the description to clarify that respondents should use "rounding to even", which is (to my understanding) the default behavior of both
round
andformat
in Python. I suppose I should add explicit tests for this too.A little inefficient because it checks pairs twice, but simple and intuitive!
This comment is hidden because it contains spoiler information about the solution
huh. I tried this and hit a timeout.
Hey, that walrus operator line is pretty neat.
Agreed on the rounding constraint. The partial persons in the intermediate results are essentially just modeling variance in the year-to-year growth rate. (E.g., 1/3 of a person per year just means every third year you get an extra person.) If they're gonna make us round, it should be at the end, not in every step.
This is a really neat solution!
Holy cow. I had no idea about this "and" behavior. Unlike some languages where logical operators always return True or False, Python's "and" returns the last evaluated operand!
This was helpful; thanks!
lol wow
This must have gotten passed prior to the addition of tests with punctuation?
Nice.
This comment is hidden because it contains spoiler information about the solution
Loading more items...