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.
45762893920
is bigger than Integer.MAX_VALUE and java can't use it as an int. You have to tell java to treat it as a long by adding anL
45762893920L
will work.In the first comment there is a hidden Right-To-Left override character. So all following text will be interpreted as right to left. Try to select the text in the solution and you will see how selection behaves differently from normal. So for the computer it looks like this:
Why then the compiler does not complain? Because it is in the comment section.
imagine using sort when you can just do a linear scan
how does this work?
oh damn. I don't know why I thought we were supposed to reverse the digits. my bad.
Please take note that approaching 50K coders have solved this kata in Python, so there must be something amiss about your foreign environment. I suggest you print your I/O and debug based on what's happening exclusively here on Codewars.
uint64_t
is appropriate, butSIGSEGV
smells like an allocation error... you may post your code with proper markdown and remember to use a spoiler tag, otherwise it's just a guess as to why your code failsIssue with your code, that's the desired output
two test cases are incorrect in Java checker.
test_04:
input is
1021
but it expects2110
as output. probably a typo in the output.test_05:
input is
123495678
but it expects987654321
as output. probably a typo in the input.O! thank you so much!!!!!!
The line
vect[i] = m % 10;
is wrong. The vector is empty, and you cannot access i-th element of an empty vector.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution