Medium Math > Big Integer Arithmetic

You are given an array of integer. You have to find the sum of all possible subsequences multiplication of the array. For example: The given array of length N = 3 is {1,2,3}. All the subsequence of this array with the corresponding array multiplication are: ![enter image description here][1] The answer is 23. 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 ( 1 ≤ 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 **10^9** (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. Answer could be very large so output the answer modulo **1006000007**. Sample Input ------------ 2 3 1 2 3 3 4 1 2 Sample Output ------------- Case 1: 23 Case 2: 29 [1]: https://s3-ap-southeast-1.amazonaws.com/devskillimagestorage/questionimages/d9c4db91-3a02-c17b-d60d-08d4bc7a9d59_d1622e6e41a64bd991d51b86d8e7a712_W553xH262.png

Suman Bhadra

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 |

Solve/Submission

# | User | Language | Timing |
---|---|---|---|

01 | JACKAL1586 | Cpp14 | 0.00s |

02 | njrafi | Cpp | 0.00s |

03 | Rajib_119 | Cpp | 0.00s |

04 | mamun4122 | Cpp14 | 0.00s |

05 | sahedsohel | Cpp | 0.00s |

06 | inception_h | Cpp | 0.00s |

07 | I_See_You | Cpp14 | 0.00s |

08 | Gang_Of_Three_01 | Cpp | 0.00s |

09 | mahbubcseju | Cpp | 0.00s |

10 | Zeronfinity | Cpp | 0.00s |

11 | astinaam | Cpp14 | 0.00s |

12 | Zayed | Cpp | 0.00s |

13 | Durbin | Cpp14 | 0.00s |

14 | fsshakkhor | Cpp14 | 0.00s |

15 | ehsan_sshuvo | Cpp | 0.00s |

16 | t0whid | Cpp | 0.00s |

17 | Pure_Protea | Cpp14 | 0.00s |

18 | Hasinur_ | Cpp | 0.00s |

19 | pulak_ict_mbstu | Cpp14 | 0.00s |

20 | ittehad | Cpp | 0.00s |

21 | the_badcoder | Cpp14 | 0.00s |

22 | hiddenhopes | Cpp | 0.00s |

23 | Reayz | Cpp | 0.00s |

24 | mir_sabbir | Cpp | 0.00s |

25 | Code_Hunter | Cpp | 0.00s |

26 | tariqiitju | Cpp14 | 0.00s |

27 | feodorv | C | 0.00s |

28 | Silent_Warrior | Cpp | 0.00s |

29 | kzvd4729 | Cpp | 0.00s |

30 | MohammadShamim | Cpp | 0.00s |

31 | Bruteforcekid | Cpp | 0.00s |

32 | cre_ator | Cpp14 | 0.00s |

33 | Rafiqul01 | Cpp14 | 0.00s |

34 | Gautam | Cpp | 0.00s |

35 | shuvo_mbstu | Cpp | 0.00s |

36 | KM_Muntasir | Cpp | 0.00s |

37 | by_default | Cpp | 0.00s |

38 | Vasiljko | Cpp14 | 0.00s |

39 | NMouad21 | Cpp | 0.00s |

40 | prateepm | Cpp14 | 0.01s |

41 | Tourist | Cpp | 0.01s |

42 | iridescentAurora131 | Cpp | 0.01s |

43 | Fazla | Cpp | 0.01s |

44 | Abu_Bakar | Cpp | 0.01s |

45 | mehedi_01 | Cpp14 | 0.01s |

46 | monir769 | Cpp | 0.01s |

47 | _dipu | Cpp14 | 0.01s |

48 | _c_k_r_ | Cpp | 0.01s |

49 | Bisnu039 | Cpp | 0.01s |

50 | Nobel_ruettt | Cpp | 0.01s |

Copyright © 2015-2016 Dev Skill.

Feedback
#### Your feedback is our precious!

## Thank you for providing feedback! Our developers will be happy :)

## Sorry there was a problem when submitting the feedback. Please try again. :(