Posts: 4,654
Threads: 1,497
Joined: Sep 2016
(Jan-25-2018, 06:27 AM)Mekire Wrote: Occam's Typo. He meant to write -13
.
twice? in the original set, and in the solution set right after it?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,654
Threads: 1,497
Joined: Sep 2016
Jan-26-2018, 07:13 AM
(This post was last modified: Jan-26-2018, 07:24 AM by Skaperen.)
@league55: what 2-set do you mean that has a sum of 0?
Output:
>>> sum({-3,13})==0
False
>>>
Output:
>>> s
{0, 2, 5, 7, 13, -3}
>>> [ (p,q) for p in s for q in s if p!=q and sum({p,q})==0 ]
[]
>>>
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,654
Threads: 1,497
Joined: Sep 2016
just do it in a modulo 10 world. problem solved.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.