Answers for "collecting candies codevita solution in python"

0

collecting candies codevita solution in python

T =  int(input())
arr1 = []
for i in range(0, T):
    N = int(input())
    arr = list(map(int,input().split()))
    arr.sort()
    count = arr[0]
    for i in range(1, len(arr)):
        count = count + arr[i]
        arr1.append(count)
print(sum(arr1))
Posted by: Guest on April-19-2021

Code answers related to "collecting candies codevita solution in python"

Python Answers by Framework

Browse Popular Code Answers by Language