number of subset of subarray
Statement
Harsh is hosting a workshop and there are [[N]] participants attending the workshop forming a line. each participant can make groups such that he can be in a group with a person just behind him.
(
given 3 participants (imagine them standing in list [1, 2, 3])
3 can form only a solo group ( as there is no one behind him.
2 can form a group with [3].
1 can form a group with [ 2, (2, 3) ]
)
now Harsh want to choose some contiguous subset of participants from the group.
You have to tell what is the total number of possible options.
for 3 participants ([1, 2, 3,]) Harsh can choose ([1], [2], [3], [1, 2], [2, 3], [1, 2, 3])
Input description
First-line contain a number of test cases [[T]],
following [[T]] line has single input [[N]]
Output description
You have to tell what is the total number of possible options.
Constraints
{{1}} <= [[T]] <= {{10}}
{{1}} <= [[N]] <= {{1e6}}
Game modes
Shortest
Test cases
Test 1 Test
Input
2
3
4
Output
6
10
Validator 1 Validator
Input
5
1
2
5
7
9
Output
1
3
15
28
45
Test 2 Test
Input
6
885441
403959
794773
933489
441002
42451
Output
392003324961
81591638820
315832458151
435701323305
97241602503
901064926
Validator 2 Validator
Input
5
54405
962441
306480
183490
142564
Output
1479979215
463146820461
46965148440
16834381795
10162318330
Test 3 Test
Input
8
289776
395789
722018
292156
913379
410166
233055
581430
Output
41985209976
78324664155
260655357171
42677710246
417131055510
84118278861
27157433040
169030713165
Validator 3 Validator
Input
10
323874
57993
67233
263429
74359
379122
522567
494651
141374
90330
Output
52447345875
1681623021
2260171761
34697550735
2764667620
71866935003
136538396028
122340053226
9993374625
4079799615
Test 4 Test
Input
9
512547
610078
415230
472774
163773
267920
629369
850890
870384
Output
131352469878
186097888081
86208184065
111757863925
13410879651
35890697160
198052983765
362007321495
378784588920
Validator 4 Validator
Input
8
13317
444828
348788
730529
41412
199649
794502
972858
Output
88677903
98936197206
60826708866
266836675185
857497578
19929961425
315617111253
473226830511
Solution language
Solution
Stub generator input