I think this is why I give up with Swift in codewars. The tests run and pass in 6ms but the process timesout in 12000ms and fails.
Passed: 2 Failed: 0 Errors: 1
Test Results:
SolutionTest
Tests From Example (pass in 4.5ms)
Tests Large Diamonds (pass in 0.3ms)
Completed in 6.611ms
RandomTest
STDERR:
Process was terminated. It took longer than 12000ms to complete
Updated.
Updated.
Probably.
Function name + keep the description. Otherwise it looks good.
Would you accept the translation if I changed the function name?
Descriptions are the same for all languages, so function names shouldn't be just edited like this.
Let's make the result of division by
0
42
so that it's defined as well...I like this better. You just forgot the '=' in '>='
I like this solution, but it seems hardly worth the effort of writing a function. Nice work!
@JohanWiltink I added random tests. Can a rejected translation be opened?
Submit testing lacks random tests
I just tried it. It works now.
should be good, now.
I think this is why I give up with Swift in codewars. The tests run and pass in 6ms but the process timesout in 12000ms and fails.
Passed: 2 Failed: 0 Errors: 1
Test Results:
SolutionTest
Tests From Example (pass in 4.5ms)
Tests Large Diamonds (pass in 0.3ms)
Completed in 6.611ms
RandomTest
STDERR:
Process was terminated. It took longer than 12000ms to complete
My Swift solution couldn't use arc4random_uniform in Codewars so I wrote my own random function using time.
That just creates a string that repeats
string
n
times. Nothing more to it.Loading more items...