Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
clear maths solution in Clear category for Oil Pie by kdim
from math import gcd
def divide_pie(groups):
a, b, s = 1, 1, sum(map(abs, groups))
for i in groups:
a = a * s + i * (a, -b)[i > 0]
b = b * s
return a // gcd(a, b), b // gcd(a, b)
Feb. 21, 2021
Comments: