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.
In Python, are my two very different algorithms too slow or could it be related to the generation of long random test cases ? Is there a way to time each ?
vv
I either time out but my logic is correct (checked out of CW) or I follow the hint to use s = (s % (M+1) + math.floor(s/(M+1))) % M and get an error:
OverflowError: integer division result too large for a float
Should we go bitwise arithmetic to solve this ? If so, not sure it is a 6kyu.
I spent 10 hours+ figuring out a mathematical solution based on triangular numbers and the hint that a solution existed without iteration. Keep trying. I'm probably dumber ;-)
Python Test results are strange: [1,2,3,4,5,6,7 ] Expected result = 0 ?
Very hard kata.
pure math problem. don t code anything !
You need to go through all sequences of 5 digits in the string and find the maximun. In a 2 digit example 3289658, you check 32, 28, 89, 96 ,65, 58 and so on and your max is 32 then 89 then 96 ... so max = 96
Tests in Python are inconsistent. Sometime the last space is kept, but not the next one. Waste of time.
\n
\n
This comment is hidden because it contains spoiler information about the solution
Random length of tests make it more difficult than 6 kyus. I don't know of two digits bank number or 200 long ones.
A 20 long bank number is not a bank number, it is a random string.
This comment is hidden because it contains spoiler information about the solution
Random number of white spaces makes it more difficult than 7 kyu for newbies, imho.
How do you raise an exception with a simple error message in Python3. I tried raise Exception('message') but it doesn't work. Not your usual 8 kyu in Python, if i may comment.
Loading more items...