Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print(sum([2**(len(set(map(int, x.split(":")[1].split("|")[0].split())).intersection(set(map(int, x.split(":")[1].split("|")[1].split()))))-1) if set(map(int, x.split(":")[1].split("|")[0].split())).intersection(set(map(int, x.split(":")[1].split("|")[1].split()))) else 0 for x in open("input").read().splitlines()]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement