
    Design an algorithm that calculates the number of ways the AI content moderation system can classify a sequence of posts across n severity categories, such that exactly m posts are classified as more harmful than the post immediately following them in the sequence. The algorithm should help content moderators understand the possible distribution patterns of harmful content classifications, considering both the total number of categories n and the relative position m of severity transitions.
    

    
def eulerian_num(n, m):
    """
    Design an algorithm that calculates the number of ways the AI content moderation system can classify a sequence of posts across n severity categories, such that exactly m posts are classified as more harmful than the post immediately following them in the sequence. The algorithm should help content moderators understand the possible distribution patterns of harmful content classifications, considering both the total number of categories n and the relative position m of severity transitions.
    

    """
def eulerian_num(n, m):
    """
    Design an algorithm that calculates the number of ways the AI content moderation system can classify a sequence of posts across n severity categories, such that exactly m posts are classified as more harmful than the post immediately following them in the sequence. The algorithm should help content moderators understand the possible distribution patterns of harmful content classifications, considering both the total number of categories n and the relative position m of severity transitions.
    

    """
    if m >= n or n == 0:
        return 0
    if m == 0:
        return 1
    return (n - m) * eulerian_num(n - 1, m - 1) + (m + 1) * eulerian_num(n - 1, m)