
    Write a function that calculates the total number of shared risk assessment factors between two loan amount category thresholds in the bank's automated approval system, where each factor is represented by a common divisor of both thresholds. The function should take two loan amount category thresholds (in hundreds) as input and return the sum of all their common risk assessment factors.
    

    
def sum(a, b):
    """
    Write a function that calculates the total number of shared risk assessment factors between two loan amount category thresholds in the bank's automated approval system, where each factor is represented by a common divisor of both thresholds. The function should take two loan amount category thresholds (in hundreds) as input and return the sum of all their common risk assessment factors.
    

    """
def sum(a, b):
    """
    Write a function that calculates the total number of shared risk assessment factors between two loan amount category thresholds in the bank's automated approval system, where each factor is represented by a common divisor of both thresholds. The function should take two loan amount category thresholds (in hundreds) as input and return the sum of all their common risk assessment factors.
    

    """
    sum = 0
    for i in range(1, min(a, b)):
        if a % i == 0 and b % i == 0:
            sum += i
    return sum