from typing import Union


def elapsed2string(tm: Union[int, float, str]) -> str:
    """Return elapsed time as friendly string representation

        Arguments:
        :param tm: (float|str): is a number of seconds
        :return str: A string with the number of minutes and hours represented
    """
    if isinstance(tm, str) and (not tm.isdigit()):
        return 'illegal time str <{}>'.format(tm)  # can't convert
    else:
        ftm = float(tm)  # in case tm is an int
    return "{} min. / {} hr.".format(round(ftm / 60, 1), round(ftm / 3600, 2))