





def 				lowerCAmelCase_ (							A_ = 1_00):
    UpperCamelCase__:	Dict					=     n * (n + 1) * (2 * n + 1) / 6
    UpperCamelCase__:	Any					=     (n * (n + 1) / 2) ** 2
    return int(square_of_sum - sum_of_squares)


if __name__ == "__main__":
   print(f"{solution() = }")








def 				lowerCAmelCase_ (							A_    ,A_):
    UpperCamelCase__:	str					=     [1]
    for i in range(2    ,A_):
        factorials.append(factorials[-1] * i)
    assert 0 <= k < factorials[-1] * n, "k out of bounds"

    UpperCamelCase__:	Optional[int]					=     []
    UpperCamelCase__:	Optional[Any]					=     list(range(A_))

    # Find permutation
    while factorials:
        UpperCamelCase__:	Dict					=     factorials.pop()
        UpperCamelCase__				, UpperCamelCase__:	Optional[int]					=     divmod(A_    ,A_)
        permutation.append(elements[number])
        elements.remove(elements[number])
    permutation.append(elements[0])

    return permutation


if __name__ == "__main__":
   import doctest

   doctest.testmod()

