Google-Developer-Student-Club-CCOEW / Competitive-Coding

7 stars 51 forks source link

Question 79 #188

Closed Mahi1901 closed 2 years ago

Mahi1901 commented 2 years ago

Given an integer N, consider all arrays A of size N such that: All the elements are non-negative and distinct. All prefix sums are odd. Formally, for all ii such that 1≤i≤N, ∑ (j=1 to i) Ai is odd. Among all possible arrays A, output the smallest possible sum of the elements of the array.

Input Format The first line contains T - the number of test cases. Then the test cases follow. The first line of each test case contains N - the size of the array. Output Format For each test case, output on one line the smallest sum among all arrays satisfying the constraints.

Constraints 1≤T≤10^6 1≤N≤10^9

Sample 1: Input 1 3 Output 3

AnnadaD commented 2 years ago

Annada Dash CCOEW Computer Engineering I would like to work on this issue Can you please assign me this issue

NikitaMiraje commented 2 years ago

Nikita Miraje CCOEW E&TC I would like to work on this issue Can you please assign me this issue

Mahi1901 commented 2 years ago

I have assigned. Happy coding!

aditi3004 commented 2 years ago

HEY!!! This is Aditi Sharma(SY-C) MKSSS's CCOEW Computer Engineering

I want to work on this issue Can you assign this to me?