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.
PHP fork: Add random tests and other things.
Description should be language-agnostic
No random tests in PHP
If the result is an array with two elements, they need be in the same order as they appear in the input. Otherwise, it seems the tests will not pass.
Your solution is not correct (read the description, you are not doing what is requested). The C# translation is fine.
fixed
fixed
Came back to this one after a month.
Tried to print the inputs this time and this is what I've got:
// This is what it looks like for every test except random
Number: 1
Array: -32
Array: 12
Array: 8
Array: -10
Array: -2
Array: 4
It prints the target number and the numbers in the array. As expected.
// This is for the random test
Number: -862
Number: -862
Array: -862
Seems like it's giving two target numbers and an array containing only one number.
This comment is hidden because it contains spoiler information about the solution
In PHP predefined code need to rename
Kata
class. Because in tests another class name is used.To eliminate this error need to rename
Kata
class toRoundToNearest
class. Tests applies to anouther class name, notKata
.Why did I get this mistake?
Error: Class 'RoundToNearest' not found?
This comment is hidden because it contains spoiler information about the solution
Can`t pass RandomGeneratedTests
Expected is System.Int32[1],
actual is System.Int32[0]
Values differ at index [0]
Missing: < -734 >
what input values?
Resolved.
Loading more items...