You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
346 B
Python
13 lines
346 B
Python
6 years ago
|
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)
|