Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. n = int(input())
  2. g=n
  3. s = 0
  4. x0 = 0
  5.  
  6. while n > 0:
  7. x = n % 10
  8. if x % 4 == 0:
  9. s += x
  10. if x == 0:
  11. x0 += 1
  12. n = n // 10
  13.  
  14. if s != 0:
  15. print (s)
  16. else:
  17. if g==0:
  18. print (0)
  19. else:
  20. print ('No')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement