#
W.C 4.3 Mr Stark

Mr. Stark is the owner of Stark industries, a manufacturer of weaponry.

A local Mafia group has hijacked one of the factories in the desert.

The mafias want to transport the weapons from the factory to their base camp, and use

a single truck to do it.

But, every kilometer the truck travels with the weapons, one weapon falls off and

breaks. The truck can only travel integral values of distance, and will lose 1 weapon for

every km travelled.

The weapons can be unloaded at any point from the truck, and can be picked up again

later.

Given the number of weapons X, max capacity of the truck Y and distance between the

factory and the base Z, find the maximum number of weapons that can be transferred

intact from the factory to the mafia base.

Sample testcase:

Input:

10 5 5

Output:

2

Testcases :

Input:

500 1000 100

Input:

200 100 125

Input:

3000 1000 1000

Input:

25000,10000,12000

Submit final as average of all answers(excluding sample testcase)

### This challenge is worth 60 points.

### You must be logged in to submit a solution

View ranklist for this challenge

About scoring and submission