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.
thanks, it's clear now
Only sums of elements of the input array are allowed. You cannot write
144
as a sum of some elements of[50, 40, 30, 20, 10]
because any sum of such elements is a multiple of10
.90
is a correct answer because90 = 50 + 40
and it is not possible to get a larger sum divisible by9
using numbers from the input array.in an example we have an array of [50,40,30,20,10] that equal 150 in total, and k = 9
so I got in my result 144, 144 is a multiple of 9 but it's not working and they said the correct output should be 90
can someone explain it for me please, maybe I didn't understand the kata
This comment is hidden because it contains spoiler information about the solution
On one hand I agree that it would've made it easy and that it should require effort to solve it.
BUT! Perhaps MENTIONING THAT WE CANNOT USE BIGINT in the kata description would've been most wonderfully, awesomely, magnificently excellent and logical, no?!
So people wouldn't wrack their brains wondering why the hell "BigInt is not defined" and wasting time trying to solve the issue, - instead of concentrating on solving the actual problem?
Goddammit, this is so frustrating.
It does not work because in the node vs 8 it had not yet been implemented.
Because it would make the kata trivial and not worth of its rank. This kata is ranked blue for a reason, and it's supposed to be difficult.
This comment is hidden because it contains spoiler information about the solution
--address equal (address-1)
Please, Can you explain this code!
I have the same problem, dont undestand why......
Why? The submission tests are not the same as the sample tests. You need to make sure your code works for all valid inputs and handles invalid inputs if necessary. The error should guide you.
The code work correctly in my text editor, and the test goes well, but when I submit the code I get syntax error !!! so like this error should be displayed when I test the code not just when I submit it