Advertisement
Ritam_C

Uri 1120

Dec 27th, 2020
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. while True:
  2.     d, n = map(str, input().split(' '))
  3.    
  4.     if d == '0' and n == '0':
  5.         break
  6.    
  7.     n = list(n)
  8.     i = 0
  9.     while i < len(n):
  10.         if d == n[i]:
  11.             n.pop(i)
  12.        
  13.         else:
  14.             i += 1
  15.            
  16.     if len(n) == 0:
  17.         print(0)
  18.    
  19.     else:
  20.         print(int(''.join(n)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement