Let $N$ be the greatest four-digit positive integer with the property that whenever one of its digits is changed to $1$, the resulting number is divisible by $7$. Let $Q$ and $R$ be the quotient and remainder, respectively, when $N$ is divided by $1000$. Find $Q+R$.

Solution:
We note that by changing a digit to $1$ for the number $\overline{abcd}$, we are subtracting the number by either $1000(a-1)$, $100(b-1)$, $10(c-1)$, or $d-1$. Thus, $1000a + 100b + 10c + d \equiv 1000(a-1) \equiv 100(b-1) \equiv 10(c-1) \equiv d-1 \pmod{7}$. We can casework on $a$ backwards, finding the maximum value.
(Note that computing $1000 \equiv 6 \pmod{7}, 100 \equiv 2 \pmod{7}, 10 \equiv 3 \pmod{7}$ greatly simplifies computation).
Applying casework on $a$, we can eventually obtain a working value of $\overline{abcd} = 5694 \implies \boxed{699}$. ~akliu
Let our four digit number be $abcd$. Replacing digits with 1, we get the following equations:
$1000+100b+10c+d \equiv 0 \pmod{7}$
$1000a+100+10c+d \equiv 0 \pmod{7}$
$1000a+100b+10+d \equiv 0 \pmod{7}$
$1000a+100b+10c+1 \equiv 0 \pmod{7}$
Reducing, we get
$6+2b+3c+d \equiv 0 \pmod{7}$ $(1)$
$6a+2+3c+d \equiv 0 \pmod{7}$ $(2)$
$6a+2b+3+d \equiv 0 \pmod{7}$ $(3)$
$6a+2b+3c+1 \equiv 0 \pmod{7}$ $(4)$
Subtracting $(2)-(1), (3)-(2), (4)-(3), (4)-(1)$, we get:
$3a-b \equiv 2 \pmod{7}$
$2b-3c \equiv 6 \pmod{7}$
$3c-d \equiv 2 \pmod{7}$
$6a-d \equiv 5 \pmod{7}$
For the largest 4 digit number, we test values for a starting with 9. When a is 9, b is 4, c is 3, and d is 7.  However, when switching the digits with 1, we quickly notice this doesnt work. Once we get to a=5, we get b=6,c=9,and d=4. Adding 694 with 5, we get $\boxed{699}$ -westwoodmonster
Let our four digit number be $abcd$. Replacing digits with 1, we get the following equations:
$1000+100b+10c+d \equiv 0 \pmod{7}$
$1000a+100+10c+d \equiv 0 \pmod{7}$
$1000a+100b+10+d \equiv 0 \pmod{7}$
$1000a+100b+10c+1 \equiv 0 \pmod{7}$
Add the equations together, we get:
$3000a+300b+30c+3d+1111 \equiv 0 \pmod{7}$
And since the remainder of 1111 divided by 7 is 5, we get:
$3abcd \equiv 2 \pmod{7}$
Which gives us:
$abcd \equiv 3 \pmod{7}$
And since we know that changing each digit into 1 will make abcd divisible by 7, we get that $d-1$, $10c-10$, $100b-100$, and $1000a-1000$ all have a remainder of 3 when divided by 7. Thus, we get $a=5$, $b=6$, $c=9$, and $d=4$. Thus, we get 5694 as abcd, and the answer is $694+5=\boxed{699}$.
~Callisto531
Let our four digit number be $abcd$. Replacing digits with 1, we get the following equations:
$1000+100b+10c+d \equiv 0 \pmod{7}$
$1000a+100+10c+d \equiv 0 \pmod{7}$
$1000a+100b+10+d \equiv 0 \pmod{7}$
$1000a+100b+10c+1 \equiv 0 \pmod{7}$
Then, we let x, y, z, t be the smallest whole number satisfying the following equations:
$1000a \equiv x \pmod{7}$
$100b \equiv y \pmod{7}$
$10a \equiv z \pmod{7}$
$d \equiv t \pmod{7}$
Since 1000, 100, 10, and 1 have a remainder of 6, 2, 3, and 1 when divided by 7, we can get the equations of:
(1): $6+y+z+t \equiv 0 \pmod{7}$
(2): $x+2+z+t \equiv 0 \pmod{7}$
(3): $x+y+3+t \equiv 0 \pmod{7}$
(4): $x+y+z+1 \equiv 0 \pmod{7}$
Add (1), (2), (3) together, we get:
$2x+2y+2z+3t+11 \equiv 0 \pmod{7}$
We can transform this equation to:
$2(x+y+z+1)+3t+9 \equiv 0 \pmod{7}$
Since, according to (4), $x+y+z+1$ has a remainder of 0 when divided by 7, we get:
$3t+9 \equiv 0 \pmod{7}$
And because t is 0 to 6 due to it being a remainder when divided by 7, we use casework and determine that t is 4.
Using the same methods of simplification, we get that x=2, y=5, and z=6, which means that 1000a, 100b, 10c, and d has a remainder of 2, 5, 6, and 4, respectively. Since a, b, c, and d is the largest possible number between 0 to 9, we use casework to determine the answer is a=5, b=6, c=9, and d=4, which gives us an answer of $5+694=\boxed{699}$
~Callisto531 and his dad

Answer: 699

Question: Let $N$ be the greatest four-digit positive integer with the property that whenever one of its digits is changed to $1$, the resulting number is divisible by $7$. Let $Q$ and $R$ be the quotient and remainder, respectively, when $N$ is divided by $1000$. Find $Q+R$.


Torus $T$ is the surface produced by revolving a circle with radius $3$ around an axis in the plane of the circle that is a distance $6$ from the center of the circle (so like a donut). Let $S$ be a sphere with a radius $11$. When $T$ rests on the outside of $S$, it is externally tangent to $S$ along a circle with radius $r_i$, and when $T$ rests on the outside of $S$, it is externally tangent to $S$ along a circle with radius $r_o$. The difference $r_i-r_o$ can be written as $\tfrac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. Find $m+n$.
[asy] unitsize(0.3 inch); draw(ellipse((0,0), 3, 1.75)); draw((-1.2,0.1)..(-0.8,-0.03)..(-0.4,-0.11)..(0,-0.15)..(0.4,-0.11)..(0.8,-0.03)..(1.2,0.1)); draw((-1,0.04)..(-0.5,0.12)..(0,0.16)..(0.5,0.12)..(1,0.04)); draw((0,2.4)--(0,-0.15)); draw((0,-0.15)--(0,-1.75), dashed); draw((0,-1.75)--(0,-2.25)); draw(ellipse((2,0), 1, 0.9)); draw((2.03,-0.02)--(2.9,-0.4)); [/asy]

Solution:
First, let's consider a section $\mathcal{P}$ of the solids, along the axis.
By some 3D-Geomerty thinking, we can simply know that the axis crosses the sphere center. So, that is saying, the $\mathcal{P}$ we took crosses one of the equator of the sphere.
Here I drew two graphs, the first one is the case when $T$ is internally tangent to $S$,

and the second one is when $T$ is externally tangent to $S$.

For both graphs, point $O$ is the center of sphere $S$, and points $A$ and $B$ are the intersections of the sphere and the axis. Point $E$ (ignoring the subscripts) is one of the circle centers of the intersection of torus $T$ with section $\mathcal{P}$. Point $G$ (again, ignoring the subscripts) is one of the tangents between the torus $T$ and sphere $S$ on section $\mathcal{P}$. $EF\bot CD$, $HG\bot CD$.
And then, we can start our calculation.
In both cases, we know $\Delta OEF\sim \Delta OGH\Longrightarrow \frac{EF}{OE} =\frac{GH}{OG}$.
Hence, in the case of internal tangent, $\frac{E_iF_i}{OE_i} =\frac{G_iH_i}{OG_i}\Longrightarrow \frac{6}{11-3} =\frac{r_i}{11}\Longrightarrow r_i=\frac{33}{4}$.
In the case of external tangent, $\frac{E_oF_o}{OE_o} =\frac{G_oH_o}{OG_o}\Longrightarrow \frac{6}{11+3} =\frac{r_o}{11}\Longrightarrow r_o=\frac{33}{7}$.
Thereby, $r_i-r_o=\frac{33}{4}-\frac{33}{7}=\frac{99}{28}$. And there goes the answer, $99+28=\boxed{\mathbf{127} }$
~Prof_Joker

Answer: 127

Question:
Torus $T$ is the surface produced by revolving a circle with radius $3$ around an axis in the plane of the circle that is a distance $6$ from the center of the circle (so like a donut). Let $S$ be a sphere with a radius $11$. When $T$ rests on the outside of $S$, it is externally tangent to $S$ along a circle with radius $r_i$, and when $T$ rests on the outside of $S$, it is externally tangent to $S$ along a circle with radius $r_o$. The difference $r_i-r_o$ can be written as $\tfrac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. Find $m+n$.
[asy] unitsize(0.3 inch); draw(ellipse((0,0), 3, 1.75)); draw((-1.2,0.1)..(-0.8,-0.03)..(-0.4,-0.11)..(0,-0.15)..(0.4,-0.11)..(0.8,-0.03)..(1.2,0.1)); draw((-1,0.04)..(-0.5,0.12)..(0,0.16)..(0.5,0.12)..(1,0.04)); draw((0,2.4)--(0,-0.15)); draw((0,-0.15)--(0,-1.75), dashed); draw((0,-1.75)--(0,-2.25)); draw(ellipse((2,0), 1, 0.9)); draw((2.03,-0.02)--(2.9,-0.4)); [/asy]


There is a collection of $25$ indistinguishable white chips and $25$ indistinguishable black chips. Find the number of ways to place some of these chips in the $25$ unit cells of a $5\times5$ grid such that:

each cell contains at most one chip
all chips in the same row and all chips in the same column have the same colour
any additional chip placed on the grid would violate one or more of the previous two conditions.

Solution:
The problem says "some", so not all cells must be occupied.
We start by doing casework on the column on the left. There can be 5,4,3,2, or 1 black chip. The same goes for white chips, so we will multiply by 2 at the end. There is $1$ way to select $5$ cells with black chips. Because of the 2nd condition, there can be no white, and the grid must be all black- $1$ way . There are $5$ ways to select 4 cells with black chips. We now consider the row that does not contain a black chip. The first cell must be blank, and the remaining $4$ cells have $2^4-1$ different ways($-1$ comes from all blank). This gives us $75$ ways. Notice that for 3,2 or 1 black chips on the left there is a pattern. Once the first blank row is chosen, the rest of the blank rows must be ordered similarly. For example, with 2 black chips on the left, there will be 3 blank rows. There are 15 ways for the first row to be chosen, and the following 2 rows must have the same order. Thus, The number of ways for 3,2,and 1 black chips is $10*15$, $10*15$, $5*15$. Adding these up, we have $1+75+150+150+75 = 451$. Multiplying this by 2, we get $\boxed{902}$.
~westwoodmonster
Note that the answer is equivalent to the number of ways to choose rows and columns that the white chips occupy, as once those are chosen, there is only one way to place the chips, and every way to place the chips corresponds to a set of rows and columns occupied by the white pieces.
If the white pieces occupy none of the rows, then because they don't appear on the board, they will not occupy any of the columns. Similar logic can be applied to show that if white pieces occupy all of the rows, they will also occupy all of the columns.
The number of sets of rows and columns that white can occupy are $2^{5} - 2 = 30$ each, accounting for the empty and full set.
So, including the board with 25 white pieces and the board with 25 black pieces, the answer is $30^{2}+2 = \boxed{902}$
Case 1: All chips on the grid have the same color.
In this case, all cells are occupied with chips with the same color.
Therefore, the number of configurations in this case is 2.
Case 2: Both black and white chips are on the grid.
Observation 1: Each colored chips must occupy at least one column and one row.
This is because, for each given color, there must be at least one chip. Therefore, all chips placed in the cells that are in the same row or the same column with this given chip must have the same color with this chip.
Observation 2: Each colored chips occupy at most 4 rows and 4 columns.
This directly follows from Observation 1.
Observation 3: For each color, if all chips in this color occupy columns with $x$-coordinates $\left\{ x_1, \cdots, x_m \right\}$ and rows with $y$-coordinates $\left\{ y_1, \cdots, y_n \right\}$, then every cell $\left( x, y \right)$ with $x \in \left\{ x_1, \cdots , x_m \right\}$ and $y \in \left\{ y_1, \cdots , y_n \right\}$ is occupied by a chip with the same color.
This is because, if there is any cell in this region occupied by a chip with a different color, it violates Condition 2.
If there is any cell in this region that is empty, then it violates Condition 3.
Observation 4: For each color, if all chips in this color occupy columns with $x$-coordinates $\left\{ x_1, \cdots, x_m \right\}$ and rows with $y$-coordinates $\left\{ y_1, \cdots, y_n \right\}$, then every cell $\left( x, y \right)$ with $x \notin \left\{ x_1, \cdots , x_m \right\}$ and $y \in \left\{ y_1, \cdots , y_n \right\}$, or $x \in \left\{ x_1, \cdots , x_m \right\}$ and $y \notin \left\{ y_1, \cdots , y_n \right\}$ is empty.
This is because, if there is any cell in this region occupied by a chip with a different color, it violates Condition 2.
Observation 5: For each color, if all chips in this color occupy columns with $x$-coordinates $\left\{ x_1, \cdots, x_m \right\}$ and rows with $y$-coordinates $\left\{ y_1, \cdots, y_n \right\}$, then every cell $\left( x, y \right)$ with $x \notin \left\{ x_1, \cdots , x_m \right\}$ and $y \notin \left\{ y_1, \cdots , y_n \right\}$ is occupied by chips with the different color.
This follows from Condition 3.
By using the above observations, the number of feasible configurations in this case is given by
\begin{align*}
\sum_{n=1}^4 \sum_{m=1}^4 \binom{5}{n} \binom{5}{m}
& = \left( \sum_{n=1}^4 \binom{5}{n} \right)
\left( \sum_{m=1}^4 \binom{5}{m} \right) \\
& = \left( 2^5 - 2 \right)^2 \\
& = 900 .
\end{align*}
Putting all cases together, the total number of feasible configurations is $2 + 900 =  \boxed{\textbf{(902) }}$.

~Steven Chen (Professor Chen Education Palace, www.professorchenedu.com)

Answer: 902

Question:
There is a collection of $25$ indistinguishable white chips and $25$ indistinguishable black chips. Find the number of ways to place some of these chips in the $25$ unit cells of a $5\times5$ grid such that:

each cell contains at most one chip
all chips in the same row and all chips in the same column have the same colour
any additional chip placed on the grid would violate one or more of the previous two conditions.