Computer Science, asked by arjunnkarthikeyann, 1 month ago

Pranav, an enthusiastic kid visited the "Fun Fair 2017" along with his family. His father wanted him to purchase entry tickets from the counter for his family members. Being a little kid, he is just learning to understand about units of money. Pranav has paid some amount of money for the tickets but he wants your help to give him back the change of Rs. N using minimum number of rupee notes.

Consider a currency system in which there are notes of seven denominations, namely, Rs. 1, Rs. 2, Rs. 5, Rs. 10, Rs. 50, Rs. 100. If the change given to Pranav Rs. N is input, write a program to compute smallest number of notes that will combine to give Rs. N.

Note:
Refer to problem specifications.

Input Format:
First line of the input is an integer N, the change to be given to Pranav.

Output Format:
Output should display the the smallest number of notes that will combine to give N.
Refer sample input and output for formatting specifications.

Sample Input 1:
1200

Sample Output1:
12

Sample Input 2:
242

Sample Output2:
7

Answers

Answered by mahimapanday53
0

Concept:

Python is a high-level, general-purpose programming language that is extremely popular. The Python programming language (the most recent version is Python 3) is utilised in web development, machine learning applications, and every other cutting-edge technology in the software industry. Python is an excellent programming language for beginners as well as experienced programmers with other programming languages such as C++ and Java.

Find:

Compute the smallest number of notes.

Program:

cr=(100,50,10,5,2,1)\\n  = int(inp{u}t())\\cnt=0\\i=0\\rm=n\\

while \quad rem!=0:\\.\quad cnt+= rm//cr[i]\\.\quad rm=n\% cr[i]\\.\quad i+=1\\\\print(cnt)

Hence, the program computes the smallest number of notes required to get the sum.

#SPJ3

Answered by vijayambiga03
0

Answer:

ghjvfyjkfwdvvjkkxdssc nkkcfhjo

Similar questions