You are viewing a single comment's thread. Return to all comments →
why this code doesn't worked on 10 or more elements !!! :( please help!!!!!!!!!!!!!!!!!!
python 3
def andXorOr(a): b=a sum=[] c=[] for i in range(1,len(a)+1): for x in range(i+1,len(a)+1): b=a for j in range(i-1,x): c.append(b[j]) min1=min(c) c.remove(min1) min2=min(c) ans=(((min1 & min2)^(min1 | min2))&(min1 ^ min2)) sum.append(ans) p=max(sum) return(p)
Seems like cookies are disabled on this browser, please enable them to open this website
AND xor OR
You are viewing a single comment's thread. Return to all comments →
why this code doesn't worked on 10 or more elements !!! :( please help!!!!!!!!!!!!!!!!!!
python 3