5 filename=(len(sys.argv) > 1) and sys.argv[1] or "22_10.txt"
7 adaptors=[int(line.rstrip()) for line in open(filename, "r")]
9 end_jolts=adaptors[-1]+3
12 adaptors.append(end_jolts)
20 for adaptor in adaptors:
21 can_reach[adaptor]=[a for a in adaptors if (a >= adaptor+1 and a <= adaptor+3)]
23 for adaptor in adaptors:
24 for adaptor2 in can_reach[adaptor]:
25 if adaptor2 not in paths:
27 paths[adaptor2]+=paths[adaptor]
29 return paths[adaptors[-1]]
33 print("Maybe possibly all the configs")