Solving for different coin types