Exemple #1
0
def run_line(match):
    a = get_ints(match.group(3))
    last_seen = get_ints(match.group(4))
    t = get_ints(match.group(5))
    expected = get_strings(match.group(6))
    actual = solve(a, last_seen, t)
    assert_equals(actual, expected)
def run_line(match):
    t = int(match.group(1))
    a = get_ints(match.group(2))
    b = get_ints(match.group(3))
    direct_cost = get_strings(match.group(4))
    expected = int(match.group(5))
    actual = minimize_cost(t, a, b, direct_cost)
    assert_equals(actual, expected)
Exemple #3
0
def run_line(match):
    switches = get_strings(match.group(1))
    lamps = get_strings(match.group(2))
    expected = int(match.group(3))
    actual = the_min(switches, lamps)
    assert_equals(actual, expected)
Exemple #4
0
def run_line(match):
    clipboard = get_strings(match.group(1))
    t = int(match.group(2))
    expected = get_ints(match.group(3))
    actual = count_colors(clipboard, t)
    assert_equals(actual, expected)
Exemple #5
0
def run_line(match):
    g = get_strings(match.group(1))
    expected = get_strings(match.group(2))
    actual = find_graph(g)
    assert_equals(actual, expected)
Exemple #6
0
def run_line(match):
    s = match.group(1)
    k = int(match.group(2))
    expected = get_strings(match.group(3))
    actual = solve(s, k)
    assert_equals(len(actual), len(expected))
Exemple #7
0
def run_line(match):
    a = int(match.group(1))
    expected = get_strings(match.group(2))
    actual = enclose(a)
    assert_equals(area(actual), area(expected))
Exemple #8
0
def run_line(match):
    is_friend = get_strings(match.group(1))
    d = int(match.group(2))
    expected = int(match.group(3))
    actual = max_difference(is_friend, d)
    assert_equals(actual, expected)
Exemple #9
0
def run_line(match):
    sea_map = get_strings(match.group(1))
    expected = int(match.group(2))
    actual = longest(sea_map)
    assert_equals(actual, expected)
Exemple #10
0
def run_line(match):
    buses = get_strings(match.group(1))
    arrival_time = int(match.group(2))
    expected = int(match.group(3))
    actual = waiting_time(buses, arrival_time)
    assert_equals(actual, expected)