Computer Science, asked by salvaleonaj, 2 months ago

Create a python program that would perform the given description below

Program: Description:

Different countries use different coin denominations. For example, the USA uses 1, 5, 10, and 25. A desirable property of coin denominations is to have each coin at least twice the amount of its previous coin in sorted order. For example, the USA denominations have this property, but the coin denominations {1, 5, 6} do not (6 is not at least twice 5)

Given the coin denominations, create a program to determine if the set of the denomination has the above property.

INPUT: The first input line contains a positive integer, n, indicating the number of denomination sets to check. The sets are on the following n input lines, one set per line. Each set starts with an integer d (1 ≤ d ≤ 10), which is a count of various coin amounts in the set; this is followed by d distinct positive integers (each less than 1,000) giving each coin amount (assume the coin amounts are given in increasing order).

OUTPUT: At the beginning of each test case, output “Denominations: v” where v is the list denominations for each set Then, on the next output line, print a message indicating whether or not the set has the above property. Leave a blank line after the output for each test case. Follow the format illustrated in Test Cases

Answers

Answered by kevinsanthosh03
0

Answer:

I am realy sorry to say that i dont know the answer

Similar questions