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.
Well, for
[2,4,40]
it returns8, 16, 24, 32, 40
What is wrong here?
@strahle101 This solution is correct because "All numbers are equal except for one" means that there are only two different values in the array. One of the values is met in the array only once, and the other value is met 2 or more times. So input
double[]{1, 1, 2, 2, 4, 7, 5, 7, 5}
doesn't follow conditions of the task. I didn't initially catch this condition too, and was solving multiple duplicates, like you.Does removal of spaces change anything?
Why
decimal
module is imported?