Guest User

Untitled

a guest
Jun 14th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. Output
  2.  
  3. 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.
  4. The correct answer of 5858-1234 is 4624. So, for instance, 2624, 4324, 4623, 4604 and 4629 will be accepted, but 0624, 624, 5858, 4624 and 04624 will be rejected.
  5.  
  6. a,b = map(int, raw_input().split())
  7. n = a-b
  8. count = 0
  9. while n!=0:
  10. if n%10 == 0:
  11. n = n/10
  12. count += 1
  13. else:
  14. print (n-1)*(10**count)
  15. n = 0
Add Comment
Please, Sign In to add comment