Spoiler: solução c++
Vou deixar um desafio bem clássico aqui, retirado do projecteuler.net:
In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation:
1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p).
It is possible to make £2 in the following way:
1x£1 + 1x50p + 2x20p + 1x5p + 1x2p + 3x1p
How many different ways can £2 be made using any number of coins?
Publicidade:
Jogue Tibia sem mensalidades!
Taleon Online - Otserv apoiado pelo TibiaBR.
https://taleon.online







Curtir: 





Responder com Citação

