Utilizing these cost transforms you are approached to work out the swelling coefficients for every month as the proportion of current cost increment pi to the cost toward the beginning of this current month (p0+p1+⋯+pi−1).    Your supervisor said you unmistakably that the expansion coefficients should

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter11: Nonlinear Programming
Section11.2: Introductory Concepts
Problem 11P
icon
Related questions
Question

Correct answer will be upvoted else downvoted. Computer science.

 

 Utilizing these cost transforms you are approached to work out the swelling coefficients for every month as the proportion of current cost increment pi to the cost toward the beginning of this current month (p0+p1+⋯+pi−1). 

 

Your supervisor said you unmistakably that the expansion coefficients should not surpass k %, so you chose to expand a few qualities pi in such a manner, that all pi remain integers and the swelling coefficients for every month don't surpass k %. 

 

You know, that the greater changes — the more clear cheating. That is the reason you want to limit the all out amount of changes. 

 

What's the base complete amount of changes you want to make all expansion coefficients not more than k %? 

 

Input 

 

The primary line contains a solitary integer t (1≤t≤1000) — the number of experiments. 

 

The primary line of each experiment contains two integers n and k (2≤n≤100; 1≤k≤100) — the length of exhibit p and coefficient k. 

 

The second line of each experiment contains n integers p0,p1,… ,pn−1 (1≤pi≤109) — the cluster p. 

 

Output 

 

For each experiment, print the base absolute amount of changes you really want to make all swelling coefficients not more than k %.

 

 

Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Intangible cost
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole