| Name | Language | Tokens Sum | Tokens Part 1 | Tokens Part 2 | Last change | |
|---|---|---|---|---|---|---|
| 1 | Python | 180 | 57 | 123 | 22 months ago | |
| 2 | Python | 188 | 71 | 117 | 22 months ago | |
| 3 | Python | 202 | 70 | 132 | 22 months ago | |
| 4 | Kotlin | 523 | 233 | 290 | 22 months ago |
lines=open(0).readlines()repeat=[1]*len(lines)fori,lineinenumerate(lines): right,left=line.split(":")[1].split("|") shared=len(set(right.split())&set(left.split())) ifshared: forjinrange(i+1,min(i+1+shared,len(lines))): repeat[j]+=repeat[i]print(sum(repeat))