Advertisement
icarussiano

Untitled

Dec 4th, 2023
685
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. 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()]))
  2.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement