Total Waiting Time for Handmade Items
There are N clients who have ordered N handmade items. The K-th client ordered exactly one item that takes T[K] hours to make. There is only one employee who makes items for clients, and they work in the following manner:
As the result may be large, return its last nine digits without leading zeros (in other words, return the result modulo 10^9).
Complete the func in the editor 👉
that, given an array of integers T of length N, returns the total time that the clients need to wait (modulo 109).
1Example 1
2Example 2
3Example 3
4Example 4
Constraints
Limits and guarantees your solution can rely on.
N is an integer within the range [1..100,000]each element of array T is an integer within the range [1..10,000]