Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
All aboard the fractran, toot toot! solution in Creative category for Funny Addition by psykosh
from fractions import Fraction
from math import log
def checkio(data):
"""The sum of two integer elements"""
a, b = data
prog = (Fraction(5,2), Fraction(5,3))
state = 2**a*3**b
while True:
for f in prog:
newstate = state*f
if newstate.denominator == 1:
state = newstate
break
else:
return round(log(state,5))
May 22, 2015
Comments: