Print a wrong answer of A - B . Your answer must be a positive integer containing the same number of digits as the correct answer, and exactly one digit must differ from the correct answer. Leading zeros are not allowed. If there are multiple answers satisfying the above conditions, anyone will do.
Blockquote
try:
a,b = map(int,input().split())
n = a-b
i = n
count = 0
while i > 10:
if i%10 == 0:
i = i/10
count+=1
else:
break
r = n-(10**count)
print(r)
This is a logical approach. But, it fails for all test cases where the difference comes out to be a power of 10 like 10, 100, or 1000. In the else, if you check for it being a power and then make your program add instead of subtracting, it will work.