import math


def choose_team_levels(num_teams, hackathon_level):
    """ Calculates the average experience level per team and distributes any
    remaining difference among some of the teams evenly

    Returns a list of team_levels """
    avg_team_level = math.floor(hackathon_level / num_teams)
    team_levels = []
    remainder = hackathon_level % num_teams
    remainder_per_team = math.ceil(remainder / num_teams)
    if remainder > 0:
        while remainder > 0:
            team_levels.append(avg_team_level + remainder_per_team)
            remainder -= remainder_per_team
    num_team_with_avg_level = num_teams - len(team_levels)
    teams_at_normal_level = [avg_team_level for team
                             in range(num_team_with_avg_level)]
    return team_levels + teams_at_normal_level