Skip to content

Instantly share code, notes, and snippets.


pawlos/ Secret

Created Dec 17, 2017
What would you like to do?
Solution to Day 17: Spinlock - Part 1
spin = 371
solution = []
index = 0
for i in range(1,2018):
index += spin
index %= len(solution)
solution[index+1:index+1] = [i]
index += 1
print solution[solution.index(2017)+1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.