Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sum_even(a):
- rez=0
- for j in a:
- if int(j) % 2 == 0:
- rez += int(j)
- return (rez)
- def sum_odd(a):
- rez=0
- for j in a:
- if int(j) % 2 != 0:
- rez += int(j)
- return (rez)
- n = input()
- if n[0] == "-":
- line = n[1:]
- else:
- line = n
- result = sum_odd(line) * sum_even(line)
- print(result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement