⌘K
Flycodx

Gold Loan Maximum Advance

Gold Loan Maximum Advance

EasyArrays100% accepted

Arjun pawns gold at a Mumbai loan shop. The shop charges a percentage of gold's market rate daily. Given an array of daily gold rates over N days and Arjun's gold weight in grams, find the maximum loan he could have received by pawning on any single day.

Approach

Given array of N daily gold rates and a fixed percentage, find the maximum loan amount possible.

Input

gold_weight=10 gold_rates=[5000,5100,4900,5200,5050] percentage=80

Output

41600
solution.py
Loading editor...
Test 1
Test 2
Test 3

Press Run to test your custom input, or Submit to judge against all test cases.

Sign in to continue

Create a free account to run code, submit solutions and track progress.

  • Free forever — no credit card
  • 10+ languages with live execution
  • Points, streaks & leaderboards
Auto Save OnLn 1, Col 1Spaces: 4UTF-8LFPython 3