# 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

# 110/435

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 last Cpp 0.00s
10 siamcr7 Cpp 0.00s
11 ksohan Cpp 0.00s
12 Reayz Cpp 0.00s
13 _dipu Cpp14 0.00s
14 Aizen Cpp 0.00s
15 asif3058 Cpp 0.00s
16 hiddenhopes Cpp 0.00s
17 ashraful_afruz Cpp 0.00s
18 motaleb_ICT Cpp 0.00s
19 mir003 Cpp 0.00s
20 aseem_cu Cpp 0.00s
21 unknown420 Cpp 0.00s
22 Trusted_Frustrated Cpp 0.00s
23 feodorv C 0.00s
24 tajri Cpp 0.00s
25 IIUC_minhazmiraz Cpp 0.00s
26 Najat Cpp 0.00s
27 daihan_mbstu Cpp 0.00s
28 akib9ctg Cpp 0.00s
29 Not_Found0001 Cpp 0.00s
30 rayhan50001 Cpp 0.00s
31 sazal_dev Cpp 0.00s
32 Morass Cpp14 0.00s
33 pulak_ict_mbstu Cpp 0.00s
34 zahidsheikh Cpp 0.00s
35 mamun02inf Cpp14 0.01s
36 prateepm Cpp14 0.01s
37 SugiuraAyano C 0.01s
38 shuvo_mbstu Cpp 0.01s
39 wayne6172 C 0.01s
40 Saimum_140128 Cpp 0.01s
41 Ishraq_Nibir Cpp 0.01s
42 jamil993 Cpp 0.01s
43 AlaminJust Cpp 0.01s
44 Aman_khan Cpp 0.01s
45 Bisnu039 C 0.01s
46 monir769 Cpp 0.01s
47 yakin Cpp 0.01s
48 subhashis_cse Cpp 0.01s
49 plab0n Cpp 0.01s
50 nurshuvo51 Cpp 0.01s
Feedback