Driving A Mustang!

easy
1. Imagine you have a Ford Mustang and there is a circular racing circuit in the city where you want to test the car.
  2. There are N petrol pumps present on the circuit at various distances.
  3. You will be given two arrays: 
     1st array contains the amount of petrol(in litres) ith petrol pump has. 
     2nd array contains the distance(in units) of ith petrol pump from (i+1)th petrol pump.
  4. Mustang will stop at each petrol pump and have infinite capacity for storing petrol.
  5. You have to return the position from where the Mustang should start its journey in ordder to complete 1 round of the track.
  6. Mustang covers 1 unit of distance in 1Litre of petrol.

Input Format

Two integer arrays

Output Format

An integer

Constraints

1 <= N <= 50
  1 <= petrol, distance <= 100

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
4
4 6 6 5 
7 3 4 5
Output
1
Previous
Maximum Of Min Numbers In K Sized Subarrays
Next
Finding Negative Value In Ksize Window

Related Questions