Panda Guru LogoPanda
Guru

OA hard

Round 1

Questions: Alice suddenly got to know she has to bring N ribbons i.e 1 piece of each size between 1-N to school the next day. So she went to ask Bob for help. Bob said he has exactly N+1 ribbons i.e 1 piece of all sizes between 1- (N + 1). Alice can cut a ribbon of any size to whatever size she wants.

Task:
Return the Minimum number of Ribbons she needs to get from Bob.

Function description:
Complete the function solve provided in the editor. This function takes the following 1 parameter and returns the required answer:
• N: Represents the number

Input format:
• The first line contains T denoting the number of test cases. T also specifies the number of times you have to run the solve function on a different set of inputs.
• For each test case:
• The first line contains a single integer N.

Output format:
For each test case, print the required answer in a new line.

Constraints:
1 < T < 10^3
1 ≤ N ≤ 10^15

Sample input:

3 4 7 50

Sample output:

3 5 42

Explanation:

Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.