
    Write a function that validates a student's performance tracking number, where each digit represents a different academic metric, by ensuring that the number of times each digit appears in the tracking number does not exceed the actual value of that digit itself - this helps identify if any performance metric is being overreported. For example, if a digit 3 appears more than 3 times in the tracking number, it indicates potential data inconsistency that requires review.
    

    
def validate(n):
    """
    Write a function that validates a student's performance tracking number, where each digit represents a different academic metric, by ensuring that the number of times each digit appears in the tracking number does not exceed the actual value of that digit itself - this helps identify if any performance metric is being overreported. For example, if a digit 3 appears more than 3 times in the tracking number, it indicates potential data inconsistency that requires review.
    

    """
def validate(n):
    """
    Write a function that validates a student's performance tracking number, where each digit represents a different academic metric, by ensuring that the number of times each digit appears in the tracking number does not exceed the actual value of that digit itself - this helps identify if any performance metric is being overreported. For example, if a digit 3 appears more than 3 times in the tracking number, it indicates potential data inconsistency that requires review.
    

    """
    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