jumboframe

Untitled

Jun 28th, 2018
107
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def sum_even(a):
  2.     rez=0
  3.     for j in a:
  4.         if int(j) % 2 == 0:
  5.             rez += int(j)
  6.     return (rez)
  7.  
  8. def sum_odd(a):
  9.     rez=0
  10.     for j in a:
  11.         if int(j) % 2 != 0:
  12.             rez += int(j)
  13.     return (rez)
  14.  
  15. n = input()
  16. if n[0] == "-":
  17.     line = n[1:]
  18. else:
  19.     line = n
  20.  
  21. result = sum_odd(line) * sum_even(line)
  22. print(result)
RAW Paste Data