13 lines
346 B
Python
13 lines
346 B
Python
|
state = '##.##.##.##....##.##.##.##.##.##.##.##.##....##.##.##.##.##.##.##.##.##....##.##.##....##.##.##.##.##.##....##.##.##.##.##.##.##.##....##.##.##.##.##.##.##.##.##.##'
|
||
|
|
||
|
gens = 50000000000
|
||
|
|
||
|
start_idx = gens - 64
|
||
|
|
||
|
res = 0
|
||
|
for i, pot_val in enumerate(state):
|
||
|
pot_id = i + start_idx
|
||
|
if pot_val == '#':
|
||
|
res += pot_id
|
||
|
print(res)
|