def min_indices(elems):
    """
    returns the indices of the smallest element in elems
    """
    indices = []
    smallest_value = elems[0]
    for i, elem in enumerate(elems):
        if elem < smallest_value:
            smallest_value = elem
            indices = [i]
        elif elem == smallest_value:
            indices += [i]

    return indices