Difference between revisions of "2024 AIME II Problems/Problem 7"
(→Solution 1) |
|||
Line 10: | Line 10: | ||
Applying casework on <math>a</math>, we can eventually obtain a working value of <math>\overline{abcd} = 5694 \implies \boxed{699}</math>. ~akliu | Applying casework on <math>a</math>, we can eventually obtain a working value of <math>\overline{abcd} = 5694 \implies \boxed{699}</math>. ~akliu | ||
+ | |||
+ | ==Solution 2== | ||
+ | Let our four digit number be <math>abcd</math>. Replacing digits with 1, we get the following equations: | ||
+ | |||
+ | <math>1000+100b+10c+d \equiv 0 \pmod{7}</math> | ||
+ | |||
+ | <math>1000a+100+10c+d \equiv 0 \pmod{7}</math> | ||
+ | |||
+ | <math>1000a+100b+10+d \equiv 0 \pmod{7}</math> | ||
+ | |||
+ | <math>1000a+100b+10c+1 \equiv 0 \pmod{7}</math> | ||
+ | |||
+ | Reducing, we get | ||
+ | |||
+ | <math>6+2b+3c+d \equiv 0 \pmod{7}</math> <math>(1)</math> | ||
+ | |||
+ | <math>6a+2+3c+d \equiv 0 \pmod{7}</math> <math>(2)</math> | ||
+ | |||
+ | <math>6a+2b+3+d \equiv 0 \pmod{7}</math> <math>(3)</math> | ||
+ | |||
+ | <math>6a+2b+3c+1 \equiv 0 \pmod{7}</math> <math>(4)</math> | ||
+ | |||
+ | Subtracting <math>(2)-(1), (3)-(2), (4)-(3), (4)-(1)</math>, we get: | ||
+ | |||
+ | <math>3a-b \equiv 2 \pmod{7}</math> | ||
+ | |||
+ | <math>2b-3c \equiv 6 \pmod{7}</math> | ||
+ | |||
+ | <math>3c-d \equiv 2 \pmod{7}</math> | ||
+ | |||
+ | <math>6a-d \equiv 5 \pmod{7}</math> | ||
+ | |||
+ | 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 <math>\boxed{699}</math> -westwoodmonster |
Revision as of 20:50, 8 February 2024
Problem
Let be the greatest four-digit positive integer with the property that whenever one of its digits is changed to , the resulting number is divisible by . Let and be the quotient and remainder, respectively, when is divided by . Find .
Solution 1
We note that by changing a digit to for the number , we are subtracting the number by either , , , or . Thus, . We can casework on backwards, finding the maximum value.
(Note that computing greatly simplifies computation).
Applying casework on , we can eventually obtain a working value of . ~akliu
Solution 2
Let our four digit number be . Replacing digits with 1, we get the following equations:
Reducing, we get
Subtracting , we get:
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 -westwoodmonster