Question 1208021
<font color=black size=3>
x = number of 2 pointers
y = number of 6 pointers
z = number of 9 pointers
Each variable is some nonnegative whole number {0,1,2,3,...}


2x+6y+9z = total number of points
2x+6y+9z = 82


x+y+z = number of throws
The goal is to minimize x+y+z 


Since z is attached to the largest coefficient, we'll make z as large as possible to find the minimum of x+y+z.
If we made x as large as possible, then we'd be at the other end of the spectrum. 


82/9 = 9.111 approximately
This rounds down to 9.


If z = 9, then 9z = 9*9 = 81
That leaves 82-81 = 1 point left, but of course there's no way to score 1 point with 2 pointers and/or 6 pointers.
So there's no way to get exactly 82 points with z = 9.
We'll decrease z by 1.


If z = 8, then 9z = 9*8 = 72
There would be 82-72 = 10 points left, and now it appears to be possible to achieve a score of 10 with 2 pointers and/or 6 pointers.


The subproblem is now 2x+6y = 10
This turns into x+3y = 5 after dividing everything by 2.



Use a bit of trial-and-error, or you can use the Extended Euclidean Algorithm, to find one solution is (x,y) = (2,1)
Sure enough 2x+6y = 2*2+6*1 = 4+6 = 10


What are some other integer solutions on x+3y = 5?
Solve for y to get y = (-1/3)x+5/3.
It has slope -1/3 which means to go from one point to another we move down 1 and right 3.
Starting at (2,1) follow the "down 1, right 3" movement pattern to arrive at (5,0)
Go back to (2,1). Follow the reverse of that movement pattern to go up 1, left 3, and you'll arrive at (-1,2)
However, recall that x cannot be negative.


The only practical nonnegative integer solutions to x+3y = 5 are (2,1) and (5,0)
In the first case we have x+y+z = 2+1+8 = <font color=red>11</font> shots
In the second case we have x+y+z = 5+0+8 = 13 shots
The first case is the winner in terms of fewest number of throws.


Answer: <font color=red>11</font>
</font>