We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Modified Kaprekar Numbers
Modified Kaprekar Numbers
Sort by
recency
|
1046 Discussions
|
Please Login in order to post a comment
Using solution of yashdeora98294 makes all the tests passed. However, it looks like there are errors. For example, the function shows that 4879 is not Kaprekar number while wikipedia say it is. To be more specific: 4879*4879 = 23804641 and 238 + 4641 = 4879
Hello all! This is my code and it is giving the expected output(I run it in IDLE shell). But I don't know why some testcase(4/7) failed while submitting it in Hackerrank editor. If you spot any mistakes in my logic do comment.
Here is problem solution in Python, Java, C++, C and Javascript - https://programmingoneonone.com/hackerrank-modified-kaprekar-numbers-problem-solution.html
Here is my c++ solution, you can what the explanation here : https://youtu.be/MttrQCHGu3w