def euler_700(): mod = 4503599627370517 mul = 1504170715041707 result = mul while mul > 1: while mod > mul: mod = mod % mul mul -= mod result += mul return result if __name__ == "__main__": solution = euler_700() print("e700.py: " + str(solution)) assert solution == 1517926517777556