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.
0
is the sum of the empty set. You can always at least make0
, so that's where you start, and you try to get higher from there.Use spoiler flag next time.
I often use WolframAlpha or OEIS when a formula exists that is too boring or too hard to derive manually (and I don't feel like I need to practice math now).
This comment is hidden because it contains spoiler information about the solution
how did you come up with the equation for your solution?
how did you come up with the equation for your solution?
How did you come up with this equation to use in your code?
This comment is hidden because it contains spoiler information about the solution
I don't know Haskell, but in most languages it would mean that if the number was negative it would just return 0. (The max of 0 and -5 is 0 of course)
Why do you need to max with 0?