What do you mean by benchmark the code? |
You want to make sure you're going along the right track as far as what the problem requires you to solve.
I don't know why this one is being an aggravating task |
I do, and I think a few other people here do as well. Just making excuses pisses ppl (me too) off.
Anyway, moving on. If you actually wrote the code then I am impressed, even surprised.
So, forgetting about the fine points of leading zeroes etc. You now have to implement add with carry. So your function needs a carryover variable in it.
You'll notice that 78 + 39 is not 07 it is 117. You should still do the pencil and paper exercise. Maybe just mental addition.
Start with zero carry over
9 + 8 + (CO = 0) = 17 -> 0007, CO = 1
7 + 3 + (CO = 1) = 11 -> 0017, CO = 1
0 + 0 + (CO = 1) = 1 -> 0117, CO = 0 etc
Follow that pattern for all 35 digits and there's the total before post processing.
Let's see you do that.
BTW You're better off reading the numbers in as strings.