Take a test Sign in 中文
← Exercise 917 →
Search
Go to
{{searchResults.length}} {{searchResults.length === 1 ? 'result' : 'results'}} for “{{searchWords}}” No results found for “{{searchWords}}” × back to contents
Contents · by chapter
Digits (38)
Primes (31)
Fractions, Decimals, and the Floor Function (18)
Divisors, GCD, and LCM (36)
Divisibility (59)
Bases (15)
Modular Arithmetic (42)
Integer Equations (27)

Exercises and their solutions

Exercise 917
What is the ten-thousands digit (the fifth digit from the right) of $25!-20!$?
← Back to Problem 917
Solution
  1. $25!$ ends in $6$ zeros. $20!$ ends in exactly $4$ zeros, so $25!-20!\equiv-20!\pmod{10^5}$, and we need the last nonzero digit $d$ of $20!$.
  2. $20!/10^4$ is even. Mod $5$: $20!=5^4\cdot A\cdot4!$ with $A\equiv(4!)^4\equiv1$, so $20!/5^4\equiv24\equiv4$, and dividing by $2^4\equiv1$ gives $d\equiv4\pmod5$. So $d=4$ and $20!\equiv40000\pmod{10^5}$.
  3. $25!-20!\equiv-40000\equiv60000\pmod{10^5}$, so the digit is $\boxed{6}$.
Search Go to Prev      Next

Contact Us

Thanks! Your message has been sent.
By year