Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- numRecipes = int(input())
- scores = [3, 7]
- elf1 = 0
- elf2 = 1
- for i in range(15):
- elf1 = (elf1 + 1 + scores[elf1]) % len(scores)
- elf2 = (elf2 + 1 + scores[elf2]) % len(scores)
- newScores = scores[elf1] + scores[elf2]
- if newScores > 9:
- scores.append(1)
- scores.append(newScores % 10)
- else:
- scores.append(newScores)
- print(scores)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement