Solved Problem - PnC

In this lesson, we'll discuss a solved PnC Problem.

We'll cover the following...

Problem statement

There are NN different types of balls. There are k1k_1 balls of type 1, k2k_2 balls of type 22, and so on to knk_n. How many ways can you choose 22 balls that are of different types?

Input format

The first line contains one positive integer N (1N105)(1 \leq N \leq 10^5) ...