Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- multiplier, numerators = 2, [2, 3]
- for a in range(2, 100):
- if (a+1) % 3 == 0:
- numerators.append(numerators[-2] + multiplier*numerators[-1])
- multiplier += 2
- else:
- numerators.append(numerators[-2] + numerators[-1])
- total = 0
- for b in str(numerators[-1]):
- total += int(b)
- print(total)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement