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.
have you voted as Somewhat Satisfied if yes can you tell what i should improve?
@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
outcome(0, 8, 0)
is expected to equal0
, not1
, which is confusing since summing up zero 8-sided dice will always result in a sum of zero (by the usual convention that the empty sum is zero). The intended behavior forn == 0
should be clarified in the description.The description needs to clarify what should happen when
s = 0
.In Python specifically,
outcome({s}, {n}, {k})
should beoutcome({n}, {s}, {k})
Displayed argument order in test output doesn't match actual argument order.
Loading more items...