Spliting Balls solution codechef – There are NN balls in a bag. Initially, the i^{th}ith ball has a number A_iAi on it. Spliting Balls solution codechef In one second, a ball with number kk (k>1)(k>1), dissociates into kk balls, where each of the kk balls has number (k-1)(k−1) written on it. If k =…