시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB197646.154%

## 문제

When giving change to a customer in a shop, clerks are careful to hand over the minimum number of coins – so unless they have run out of coins of the appropriate denomination they will, for example, always give a customer needing \$2 in change, one \$2 coin rather than 2 \$1 coins or 4 50c coins. It might be that this is not always the best strategy however, when there is an imbalance in the stock of coins. If you have an excess of \$1 coins in the cash drawer, it might be better to give 2 \$1 coins to a customer, if only to prevent the \$1 coin bucket from overflowing. Your task is to devise and test an algorithm to decide what coins to give in change, which tries to balance the stock of coins of each denomination.

## 출력

For each problem output a line with ‘Problem #n:’, followed by the number of \$2, \$1, 50c, 20c and 10c coins respectively. This should be formatted as illustrated below with correct use of commas, and the word ‘and’. If it is not possible to provide exact change, output ‘not possible’.

## 예제 입력 1

2 2 4 2 2 $1.00 0 0 0 0 0$1.00
2 2 4 3 1 $1.30 0 0 0 0 0$0.00


## 예제 출력 1

Problem #1: 2 50c coin(s)
Problem #2: not possible
Problem #3: 2 50c, 1 20c and 1 10c coin(s)