Showing:
Handle Score
@Ibrahim Nash 6420
@mb1973 5642
@Quandray 5233
@akhayrutdinov 5111
@saiujwal13083 4610
@sanjay05 3762
@kirtidee18 3673
@marius_valentin_dragoi 3522
@sushant_a 3459
@verma_ji 3413
Maximum distance
Basic Accuracy: 24.01% Submissions: 25 Points: 1

There are N bikes and each can cover 100 km when fully fueled. What is the maximum amount of distance you can go using N bikes? You may assume that all bikes are similar and a bike takes 1 litre to cover 1 km.

Note: The answer may contain decimal value but print the integer value of the float value obtained.

Example 1:

Input:
N = 2
Output:
150
Explanation:
The 2 bikes can travel 50 Kms
together and then, the fuel of
the First bike can be transferred
to the Second, resulting in a full
tank for the second bike. The 2nd bike
will be able to travel 100 Kms more.
So, the Ouput is 150.


Example 2:

Input:
N = 3
Output:
183
Explanation:
The 3 bikes can travel 33.33 Kms
together and then, rest of the fuel of
the First bike can be transferred
to the Second, resulting in a full
tank for the second bike. The 2nd and
3rd bike can travel 50 Kms more together.
Now, both the bikes will have half fuel.
The 2nd bike can transfer the fuel to the
3rd. The 3rd will have a full tank and
travel 100 Kms more. So, the Distance
will be 183.33


You don't need to read input or print anything. Your task is to complete the function maxDist() which takes an Integer N as input and returns the answer.

Expected Time Complexity: O(N)
Expected Auxiliary Space: O(1)

Constraints:
1 <= N <= 105