IITKESO207SPA3A - Coin Game

no tags 

Problem description

 

This program deals with the coin game that was discussed in class.

 

You will have to implement a program that reads in the number of coins and the coin values, and prints out the coins that are chosen.

 

Input format

The input will consist of 2 lines. The first line will contain an integer n which denotes the number of coin values you will have to take. The second line will contain n integers in sequence.

 

Output format

You are required to print out c integers, which represent the coin values.

 

Sample input

6
4 4 4 4 4 4

 

Sample output

4 4 4

 

In case of multiple solutions, print the one with minimum number of coins selected.

Scoring method

 

Please note that apart from the sample test case posted here, there will be other hidden test cases that your code will checked on. The final score you see is a percentage of the test cases you have passed. If you pass only the sample test case, you will get 0/100 (even though your score will be shown as 10/100).

 

Each of these questions are finally worth the points mentioned in the assignment pdf file. So your credit for this problem shall be your score/100 * points for this question. Your final credit for programming assignment 3 shall be final score / 55 * 100.

 

Plagiarism and copying

 

Strict action will be taken against students who are found to be indulging in plagiarism.  Please note that changing variable names, removing indentation or moving code around will not help with regards to plagiarism checking.



Added by:Programming Club, IITK
Date:2017-06-27
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All
Resource:IIT Kanpur ESO207 Summer