Skip to content

Instantly share code, notes, and snippets.

Last active October 25, 2015 17:27
What would you like to do?
Run through game simulation
# Run through game
def game(count):
deck = []
origDeck = []
ans = 0
# Generate deck and copy
for j in range(1, count + 1):
# Run through one round
deck = round(deck)
# Loop through until deck is life first
while deck != origDeck:
deck = round(deck)
ans += 1
return ans
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment