DCP-99: Problem Selection Back to All Problems

Medium Math > Counting


Problem choosing is an impotent issue for arranging a contest. Now Devskill need to chose an problem for next contest but Devskill's people are very busy and can not chose 1 problem from N problem(s). Now they ask another person to chose k problem from their N problem(s) and they should select 1 problem from them. How many ways a problem can chose in this way. 2 way is different if chosen set from another person is different and/or selected problem for contest is different. You need to find the answer for all k (1 to N) and sum of all is the result for that particular N. Result can be very large, you need to print result module 1000000007. Input: ------ Input starts with an integer **T (1<=T<=100)**, denoting the number of test cases. Each case contains an integer **N (1 ≤ N ≤ 10^18)** denoting the number of problem. Output: ------- For each case of input, output result module 1000000007. Sample Input ------------ 1 2 Sample Output ------------- 4 Explanation -------------- N = 2 Let say problem are 1 and 2. Now, For K = 1, 1. chosen set {1} selected problem {1} 2. chosen set {2} selected problem {2} For K = 2, 1. chosen set {1,2} selected problem {1} 2. chosen set {1,2} selected problem {2} So there are 4 way to selecting a problem.


Problem Setter:

MD Musfiqur Rahman Sanim

Please login to submit solution to this problem.

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

Problem Stats

24/91

Solve/Submission

Ranking

# User Language Timing
01 a_rahman Cpp14 0.00s
02 feodorv C 0.00s
03 Morass Cpp14 0.00s
04 prateepm Cpp14 0.00s
05 MoYan Cpp 0.01s
06 umli Cpp14 0.01s
07 njrafi Cpp14 0.01s
08 tariqiitju Cpp14 0.01s
09 RandyWaterhouse Python3 0.04s
10 moinul_shaon Cpp14 0.32s
11 froghramar Cpp14 0.48s
12 smjlord068 Cpp14 0.48s
13 shuvo1862 Cpp14 0.48s
14 sahedsohel Cpp14 0.48s
15 Nirjhor Cpp14 0.49s
16 KNUTH Cpp14 0.49s
17 rubabredwan Cpp14 0.49s
18 ksohan Cpp14 0.49s
19 KIRIN_36 Cpp14 0.49s
20 swapnil Cpp14 0.50s
21 Roll_Number_27 Cpp14 0.50s
22 gaexp007895 Java 0.58s
Feedback

Your feedback is our precious!



Or call +88 02 9853138 for support