project-euler/100_arranged_probability.py

14 lines
194 B
Python
Raw Normal View History

2023-03-26 17:56:21 +02:00
#!/usr/bin/env python3
lim = 10**12
x, y = 3, 1
blue = 3
total = 4
while total <= lim:
x, y = 3*x + 8*y, 3*y + x
blue = (2*y + x + 1) // 2
total = (4*y + x + 1) // 2
print(blue)