Ok I didn't solve it, but I learnt some good things here.
Spent an hour adding two numbers in string, got to index 54 000 something before realising the solution. My pc heated with calculations :)
Java Sample test assertEquals params are wrong way around
Okay, so that makes it even more confusing. For example, which is the first index above 80th that will not be divisible by 10 and therefore not have a last digit of zero?
There are solutions to this. Try eliminating intermediate steps somehow.
The exact sums do not end with zero. You are asked for the last digit of the exact sum.
Yes, there is something wrong with the performance of your solution. It's too slow. Your current apporoach is never going to work.
Your solution is too slow. This is a solution issue, not a kata issue.
I tried so hard with memorize or very large numbers.... and then the solution is so easy. :D I had should think first. :D
Great kata! Thanks!
This comment is hidden because it contains spoiler information about the solution
seems like your solution is too slow and needs to be more efficient, if you post your solution below and mark it as a spoiler someone can help you :)
When I run the tests, my code works fine and all tests pass.
I have a problem with submitting my solution. I have an error which says:
"Process was terminated. It took longer than 11000ms to complete"
Any help or comment will be highly appropriated.
I have the same problem.