Page 1 of 1

Divide years by 5

Posted: Fri Jan 18, 2019 6:58 pm
by samiul_samin
$S=2018^{2019}-2019^{2018}$
What is the remainder if we divide $S$ by $5$?

Re: Divide years by 5

Posted: Fri Jan 18, 2019 7:15 pm
by samiul_samin
Hint
Modular Arithmatic
Python Code

Code: Select all

(2018**2019-2019**2018)%5
Python 3.7
Answer
$\fbox 1$
Solution
$2018^2\equiv-1(mod 5)$
:arrow: $2018^{2018}\equiv-1(mod 5)$
:arrow: $2018^{2019}\equiv-3\equiv2(mod 5)$...(1)

$2019^2\equiv1(mod 5)$
:arrow: $2019^{2018}\equiv1(mod 5)$ ...(2)

:arrow: $2018^{2019}-2019^{2018}\equiv1(mod 5)$...(1)-(2)




Source
BdMO $2019$ Selection Round Mymensingh Higher Secondary Problem no $3$

Re: Divide years by 5

Posted: Wed Jan 23, 2019 2:37 pm
by Safwan
this one was easy.simple with mod.

Re: Divide years by 5

Posted: Wed Jan 23, 2019 4:28 pm
by samiul_samin
Safwan wrote:
Wed Jan 23, 2019 2:37 pm
this one was easy.simple with mod.
But it was impossible for those who dosen't know Modular arithmatic! :geek: :geek: :geek: