You are given infinite coins of denominations 3, 5, 7. Which of the following sum CANNOT be achieved using these coins?

You are given infinite coins of denominations 3, 5, 7. Which of the following sum CANNOT be achieved using these coins?
A. 15
B. 16
C. 17
D. 4
 
Answer: D
Explanation: Sums can be achieved as follows:
15 = {5,5,5}
16 = {3,3,5,5}
17 = {3,7,7}
we can’t achieve for sum=4 because our available denominations are 3,5,7 and sum of any two denominations is greater than 4.
 

Tìm kiếm

Back
Top