In this problem, you need to evaluate the expected value of the number of times we have non-zero carry when adding two non-negative integers that contain at most N digits each. Note that we are adding the numbers in their base 10 representation.
Sample Test Cases:
input(20,4)=0
input(111,119)=1
input(123,923)=1
input(1235,98765)=5
Sample Test Cases:
input(20,4)=0
input(111,119)=1
input(123,923)=1
input(1235,98765)=5

No comments:
Post a Comment