Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Milkman serves milk in packaged bottles of varied sizes. The possible size of the bottles are { 1 , 5 , 7 and 1 0
Milkman serves milk in packaged bottles of varied sizes. The possible size of the
bottles are and litres. He wants to supply the desired quantity using as fewer bottles as possible irrespective of the size. Your objective is to help him find the minimum
number of bottles required to supply the given demand for milk.
Input Format:
The first line contains the number of test cases N
Next N lines, each contains a positive integer Li which corresponds
to the demand of milk.
Output Format:
For each input Li print the minimum number of bottles required to fulfil the demand
Constraints:
N Li i N
Sample Input and Output:
Explanation:
Number of test cases is
For
For
Few more examples:
For
For
Concepts applied: Data types, Operators, IO functions, and Loops. in c
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started