def run(self, s):
    '\n        :param s: input in string format\n        :return: solution flag\n        '
    (_, buses) = s.split('\n')
    buses = [((k % int(n)), int(n)) for (k, n) in enumerate(buses.split(',')) if (n != 'x')]
    (_, base) = buses[0]
    multiplier = base
    for (rest, b) in buses[1:]:
        k = 1
        while (((base + (multiplier * k)) % b) != (b - rest)):
            k += 1
        base = (base + (multiplier * k))
        multiplier = (multiplier * b)
    return base
:param s: input in string format
:return: solution flag
def run(self, s):
    '\n        :param s: input in string format\n        :return: solution flag\n        '
    (_, buses) = s.split('\n')
    buses = [((k % int(n)), int(n)) for (k, n) in enumerate(buses.split(',')) if (n != 'x')]
    (_, base) = buses[0]
    multiplier = base
    for (rest, b) in buses[1:]:
        k = 1
        while (((base + (multiplier * k)) % b) != (b - rest)):
            k += 1
        base = (base + (multiplier * k))
        multiplier = (multiplier * b)
    return base