# DCP-379: SUMMATION Back to All Problems

Easy Math > Basic Math

You are given an array of integer. You have to find the sum of all possible **subsequence** sum of the array. For example: The given array A of length N = 3 is {1 , 2 , 3}. All the subsequence of this array with the corresponding array Sum are: ![enter image description here][1] The answer is 24. Note: subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining elements. there will be total 2^n subsequences of an array of length n. Input: ------ Input starts with an integer **T (1≤T≤10)**, denoting the number of test cases. Each case contains an integer **N (3 ≤ N ≤ 1000)** denoting the number of elements of array A. The next line will contain n integers separated by spaces, denoting the elements of the array A. Each of these integers will be between 1 and 100000000 (inclusive). Output: ------- For each case of input, output the answer of the problem in the format "**Case X: Y**" where **X** denotes the number of test case and **Y** denotes the answer. <br> Answer could be very large so output the answer modulo **100000007**. Sample Input ------------ 2 3 1 2 3 3 4 1 2 Sample Output ------------- Case 1: 24 Case 2: 28 [1]: https://s3-ap-southeast-1.amazonaws.com/devskillimagestorage/questionimages/1e107369-957b-ca00-d055-08d4bc74830f_eee9f72623514b61b689cc7201da594a_W553xH265.png

### Problem Limits

 Language Time Limit (seconds) C 1.00 C++ 1.00 C++14 1.00 C# 2.00 Go 2.00 Java 2.00 JavaScript 2.00 Objective-C 2.00 Perl 2.00 PHP 2.00 Python 2.00 Python3 2.00 Ruby 2.00 VB.Net 2.00

# 109/433

Solve/Submission

### Ranking

# User Language Timing
01 BishalG Cpp 0.00s
02 smjlord068 Cpp 0.00s
03 flash_7 Cpp14 0.00s
04 ovis96 Cpp14 0.00s
05 PKP_007 Cpp 0.00s
06 sahedsohel Cpp 0.00s
07 Hawk Cpp 0.00s
08 dmehrab06 Cpp14 0.00s
09 trifiasco Cpp 0.00s
10 last Cpp 0.00s
11 siamcr7 Cpp 0.00s
12 ksohan Cpp 0.00s
13 Reayz Cpp 0.00s
14 motaleb_ICT Cpp 0.00s
15 _dipu Cpp14 0.00s
16 Aizen Cpp 0.00s
17 asif3058 Cpp 0.00s
18 hiddenhopes Cpp 0.00s
19 ashraful_afruz Cpp 0.00s
20 mir003 Cpp 0.00s
21 aseem_cu Cpp 0.00s
22 tajri Cpp 0.00s
23 IIUC_minhazmiraz Cpp 0.00s
24 Najat Cpp 0.00s
25 akib9ctg Cpp 0.00s
26 Not_Found0001 Cpp 0.00s
27 unknown420 Cpp 0.00s
28 Trusted_Frustrated Cpp 0.00s
29 feodorv C 0.00s
30 daihan_mbstu Cpp 0.00s
31 rayhan50001 Cpp 0.00s
32 sazal_dev Cpp 0.00s
33 Morass Cpp14 0.00s
34 pulak_ict_mbstu Cpp 0.00s
35 zahidsheikh Cpp 0.00s
36 prateepm Cpp14 0.01s
37 SugiuraAyano C 0.01s
38 Saimum_140128 Cpp 0.01s
39 shuvo_mbstu Cpp 0.01s
40 wayne6172 C 0.01s
41 jamil993 Cpp 0.01s
42 AlaminJust Cpp 0.01s
43 Aman_khan Cpp 0.01s
44 yakin Cpp 0.01s
45 subhashis_cse Cpp 0.01s
46 plab0n Cpp 0.01s
47 nurshuvo51 Cpp 0.01s
48 Optimus_primeV2 Cpp 0.01s
49 Ishraq_Nibir Cpp 0.01s
50 Bisnu039 C 0.01s
Feedback