Advertisement
Mirnijat

tekrarlananReqemler

Mar 13th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. num = int(input())
  2.  
  3. arr =[]
  4. count = 0
  5.  
  6. while num:
  7.     arr.append(num%10)
  8.     num//=10
  9.  
  10.  
  11. c = 0
  12. while c<len(arr):
  13.     check = False
  14.     j=1
  15.    
  16.     while j<len(arr):
  17.         if arr[c] == arr[j]:
  18.             del arr[j]
  19.             check = True
  20.         else:
  21.             j+=1
  22.     del arr[c]
  23.     if check:
  24.         count+=1
  25.  
  26. print(count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement