def expected_game_duration(n: int, a: List[int]) -> int:
    """
    Slime and his $n$ friends are at a party. Slime has designed a game for his friends to play.
    
    At the beginning of the game, the $i$-th player has $a_i$ biscuits. At each second, Slime will choose a biscuit randomly uniformly among all $a_1 + a_2 + \ldots + a_n$ biscuits, and the owner of this biscuit will give it to a random uniform player among $n-1$ players except himself. The game stops when one person will have all the biscuits.
    
    As the host of the party, Slime wants to know the expected value of the time that the game will last, to hold the next activity on time.
    
    For convenience, as the answer can be represented as a rational number $\frac{p}{q}$ for coprime $p$ and $q$, you need to find the value of $(p \cdot q^{-1})\mod 998\,244\,353$. You can prove that $q\mod 998\,244\,353 \neq 0$.
    
    
    -----Input-----
    
    The first line contains one integer $n\ (2\le n\le 100\,000)$: the number of people playing the game.
    
    The second line contains $n$ non-negative integers $a_1,a_2,\dots,a_n\ (1\le a_1+a_2+\dots+a_n\le 300\,000)$, where $a_i$ represents the number of biscuits the $i$-th person own at the beginning.
    
    
    -----Output-----
    
    Print one integer: the expected value of the time that the game will last, modulo $998\,244\,353$.
    
    
    -----Examples-----
    Input
    2
    1 1
    
    Output
    1
    
    Input
    2
    1 2
    
    Output
    3
    
    Input
    5
    0 0 0 0 35
    
    Output
    0
    
    Input
    5
    8 4 2 0 1
    
    Output
    801604029
    
    
    
    -----Note-----
    
    For the first example, in the first second, the probability that player $1$ will give the player $2$ a biscuit is $\frac{1}{2}$, and the probability that player $2$ will give the player $1$ a biscuit is $\frac{1}{2}$. But anyway, the game will stop after exactly $1$ second because only one player will occupy all biscuits after $1$ second, so the answer is $1$.
    """


# Tests

def check(candidate):
    assert candidate(2, [1, 1]) == 1
    assert candidate(2, [1, 2]) == 3
    assert candidate(5, [0, 0, 0, 0, 35]) == 0
    assert candidate(5, [8, 4, 2, 0, 1]) == 801604029
    assert candidate(5, [24348, 15401, 19543, 206086, 34622]) == 788526601
    assert candidate(10, [7758, 19921, 15137, 1138, 90104, 17467, 82544, 55151, 3999, 6781]) == 663099907
    assert candidate(2, [0, 1]) == 0
    assert candidate(2, [184931, 115069]) == 244559876
    assert candidate(100, [9, 0, 2, 8, 3, 6, 55, 1, 11, 12, 3, 8, 32, 18, 38, 16, 0, 27, 6, 3, 3, 4, 25, 2, 0, 0, 7, 3, 6, 16, 10, 26, 5, 4, 2, 38, 13, 1, 7, 4, 14, 8, 1, 9, 5, 26, 4, 8, 1, 11, 3, 4, 18, 2, 6, 11, 5, 6, 13, 9, 1, 1, 1, 2, 27, 0, 25, 3, 2, 6, 9, 5, 3, 17, 17, 2, 5, 1, 15, 41, 2, 2, 4, 4, 22, 64, 10, 31, 17, 7, 0, 0, 3, 5, 17, 20, 5, 1, 1, 4]) == 241327503
    assert candidate(100, [4364, 698, 1003, 1128, 1513, 39, 4339, 969, 7452, 3415, 1154, 1635, 6649, 136, 1442, 50, 834, 1680, 107, 978, 983, 3176, 4017, 1692, 1113, 1504, 1118, 396, 1975, 2053, 2366, 3022, 3007, 167, 610, 4649, 14659, 2331, 4565, 318, 7232, 204, 7131, 6122, 2885, 5748, 1998, 3833, 6799, 4219, 8454, 8698, 4964, 1736, 1554, 1665, 2425, 4227, 1967, 534, 2719, 80, 2865, 652, 1920, 1577, 658, 1165, 3222, 1222, 1238, 560, 12018, 768, 7144, 2701, 501, 2520, 9194, 8052, 13092, 7366, 2733, 6050, 2914, 1740, 5467, 546, 2947, 186, 1789, 2658, 2150, 19, 1854, 1489, 7590, 990, 296, 1647]) == 301328767
    assert candidate(2, [300000, 0]) == 0
    assert candidate(36, [110, 7, 51, 3, 36, 69, 30, 7, 122, 22, 11, 96, 98, 17, 133, 44, 38, 75, 7, 10, 4, 3, 68, 50, 43, 25, 4, 29, 42, 36, 11, 7, 36, 12, 75, 1]) == 420723999
    assert candidate(39, [79, 194, 29, 36, 51, 363, 57, 446, 559, 28, 41, 34, 98, 168, 555, 26, 111, 97, 167, 121, 749, 21, 719, 20, 207, 217, 226, 63, 168, 248, 478, 1231, 399, 518, 291, 14, 741, 149, 97]) == 918301015
check(expected_game_duration)