def calculate_acc(n300, n100, n50, nMiss):
    """
    calculate the acc based on number of hits

    :param n300: number of 300s
    :param n100: number of 100s
    :param n50: number of 50s
    :param nMiss: number of misses
    :return: accuracy
    """
    return (50 * n50 + 100 * n100 + 300 * n300) / (300 * (nMiss + n50 + n100 + n300))