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.
This. It's driving me nuts
This comment is hidden because it contains spoiler information about the solution
Done.
.
Fixed
This comment is hidden because it contains spoiler information about the solution
Python is currently failing with what appears to be an error in the reference solution (see spoiler comment below).
the k=0 rule would make sense if the problem was turned into a problem where you have to select the amount of dice with n being the limit
@_@, but currently for every other output it seems to only care about the sum if u rolled all the dice
You're right, I understood it over time.
Several results make no sense. Like "act(0, 6, 0, 1)": How can you throw zero dices one time? That is physically impossible. You can only reach zero points by not throwing the dices at all, no matter how many you have.
Or "act(1, 6, 0, 1)": How can you throw one dice with side values of 1-6 and reach zero points? The minimum you can reach with one throw is 1.
Or "act(0, 6, 1, 0)": You have no dice, but you reach a score of 1 by throwing them zero times? How is that supposed to work?
Or "act(1, 6, 7, 0)": You can score a maximum of 6 points with a throw, but with zero throws you can score 7 points...?
My opinion: A target of zero can only be achived with zero throws, no matter how many dices and sides you have. If the target is >0, then there should be >0 dices, otherweise return -1 or "Error". A target larger than the maximum points you can achieve should either be removed or also lead to -1 or "Error".
In Python,
import fractions
yieldsfractions == None
. This does not seem to be intentional, so I'm assuming something in the import-prevention stuff is broken.Should be posted under "Issues"
:/
Like @crunker99 said above, it's worth noting that this evaluates the expression for every single day. Fine in this case because they're all very cheap, but something to keep in mind.
Loading more items...