
    Write a function that takes a content violation code as input, where each digit represents the number of reports in different violation categories, and determines if the frequency of reports in each category is within acceptable limits, defined as the frequency of each digit being less than or equal to the value of the digit itself.
    

    
def validate(n):
    """
    Write a function that takes a content violation code as input, where each digit represents the number of reports in different violation categories, and determines if the frequency of reports in each category is within acceptable limits, defined as the frequency of each digit being less than or equal to the value of the digit itself.
    

    """
def validate(n):
    """
    Write a function that takes a content violation code as input, where each digit represents the number of reports in different violation categories, and determines if the frequency of reports in each category is within acceptable limits, defined as the frequency of each digit being less than or equal to the value of the digit itself.
    

    """
    for i in range(10):
        temp = n
        count = 0
        while temp:
            if temp % 10 == i:
                count += 1
            if count > i:
                return False
            temp //= 10
    return True