Company: Netradyne_29oct
Difficulty: medium
Range game Problem Description You are at the range. You have N targets labeled 1 to N from left to right. Hit the target by performing the following operation: In each round starting from the first element and moving from left to right, hit every alternate target. Repeat the above step until only one target is left. Note: You will get i points when you hit a target labeled i . Calculate the score you will obtain by continuously hitting targets until there is only one target remaining. Function Description Complete the solve() function. This function takes the following argument and returns the total number of points you will get by hitting targets until only one target is left: N : Represents the total number of targets int solve (int n) { // Write your code here return 0; } Input format The first line contains an integer N denoting the total number of targets. Output format Print the total points you will get by hitting the targets by following the specified operation. Constraints 1