Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def jaleb(x):
- f=0
- z=0
- v=0
- g=x
- while x!=0:
- v=x%10
- if v%2==0:
- z=z+v
- else:
- f=f+v
- x=x//10
- if f==z:
- return(g)
- else:
- return(0)
- n=int(input())
- s=0
- ss=0
- while n!=0:
- if jaleb(n)==n:
- ss=ss+n
- s=s+1
- n=n-1
- print(ss/s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement