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.
Suggestions are supposed to be suggestions to improve the kata, not hints for other people for how to solve them.
Conversion, Conversion, Cconversion! This is your best friend here. Try not to overthink it or dilute your code.
Maybe instead of "If n < 0 or m < 0 return 0", you replace it with " If n < 0 and or m < 0 return 0"
this is so real man
pseudocode != kata suggestion
This comment is hidden because it contains spoiler information about the solution
assuming you forgot the parentheses around
(a + b), your formula would be correct with floating-point numbers. but since you're dealing with integers,n / 2truncates, which means you lose0.5whenaandbhave the same parity.Too bad, a recursive solution won't work.
Yes, now they are actually reverse.
This comment is hidden because it contains spoiler information about the solution
They are not exactly reverse. For example, m=-1 and n=1 fits both.
This comment is hidden because it contains spoiler information about the solution
The instructions are simple and clear - it's the example cases that are horrible.
I'm coming from JavaScript and I keep forgetting their is a sum function. Well, I got the right solution but it wasn't elegant. Hopefully, I'll write better code without having to do 100 more Python katas
Actually, I just found a mathematical formula for converting hours, minutes, and seconds on the internet and solved the problem in 1 minute. Thanks for the hint )
Loading more items...