XOR or ⊕ - a type of logical disjunction on two operands that results in a value of true if the operands, or disjuncts, have opposite truth values. A simple way to state this is "one or the other but not both."
l= [(3*n*n-n)/2 for n in xrange(1,2500)] d= dict((x, 1) for x in l) for e1 in l: for e2 in l: if e1+e2 in d: if e2-e1 in d: print e2-e1
No comments:
Post a Comment