• + 0 comments

    def solve(a): if len(a) == 0: return 0 evn = [nmbr for nmbr in a if nmbr%2==0] od = [nmbr for nmbr in a if nmbr%2!=0] ven = 2**(len(evn)) - 1 if len(od) > 0: do = 2**(len(od)-1) - 1 else: do = 0 tot = ven+do+do*ven return tot%1000000007