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.
OP solved it by hard-coding, closing :-)
Looking through translations, Python seems to have fixed tests with zero weight but not zero prices. Haskell seems to lack zero price tests as well in the fixed suite.
Those cases are clearly not robust enough, however, since there are still incorrect solutions that aren't invalidated.
why and how does it influence?
Weights can be zero, because diamonds exist. Prices can also be zero, because bricks exist.
If Python does not have ( fixed ) tests with zero weights and / or zero prices, these can ( and should ) be added.
The difference would be 2 in either case.
That's because some items can have a weight of 0 (which is nonsensical), and the solution only checks up to 0 (not inclusive). Change
for w in range(n, 0, -1):
tofor w in range(n, -1, -1):
and it will work.Also
n
can be 0 too. This should be fixed or at least mentioned in the description.The table name you should use is
people
, you only need to return a single column,age_sum
. That is already in the kata's description, read it again. If you have to sum them all, then the result is a single row.+1
In particular, since this is supposed to be a beginner kata.
So far, I haven't solved this kata, as the instructions need much more clarification.
What is the table name? Which columns are expected to be returned, or just one row?
OP solved it, closing
OP solved it, closing
OP solved it, closing
OP solved it, closing
OP solved it, closing
This is a common physic problem ^^ which is good ~~
OP solved it, closing
Loading more items...