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.
Very good Kata!!! Thanks to author!
Java translation
TypeScript translation
CoffeeScript translation
Javascript translation
@dfhwze I think
k == 0
is reachable iffn == 0
. (Take a look at my solution to the current version.)fixed
fixed
especially when you read it as
agreed, is this not unlike a vacuous truth?
I agree that if
k = 0
, the answer should always be1
, regardless how many dice you have, even if you have0
dice. What do others think?I think
s = 0
does not make any sense at all. I could just remove cases like this. What do you think?fixed
Duplicate issue.
python:
outcome(0, 9, 0): 1 should equal 0
There is one way of rolling the dice 0 times such that the sum is 0, that is to not roll the dice.
This is the same reason why 0! = 1
Loading more items...