题目描述
The chef is having one array of natural numbers. Cheffina challenges chef that find the sum of weights all the natural numbers present in the array, but the main problem is that all numbers have not original weights. After every 6 natural numbers weight is set to 1 as weight increases by 1 after that. (i.e. weight of 1 is 1, weight of 2 is 2 but the weight of 7 is 1 and weight of 8 is 2 and so on…). Help the chef to find the sum.
-----Input:-----
- First line will contain $T$, number of testcases. Then the testcases follow.
- Each testcase contains two lines of input, one integer $N$.
- Next line has N space separate natural numbers.
-----Output:-----
For each testcase, output in a single line answer.
-----Constraints-----
- $1 \leq T \leq 10$
- $1 \leq N \leq 10^5$
- $1 \leq arr[i] \leq 10^6$
-----Sample Input:-----
1
6
6 7 9 11 4 16
-----Sample Output:-----
23
-----EXPLANATION:-----
Array after conversion = [6, 1, 3, 5, 4, 4]
输入格式
见题面
输出格式
见题面