Processing math: 100%

Problem #202

Power and Modulo

F(k) = 5^k mod (10^{k'}) where k' = k mod 6

Let S(N) be the sum of F(k) for all 1 \leq k \leq N.

Find S(10^{18}) mod 10^9+7.

Contributed by Shivansh Arora

Solved by 92 users

Log in to submit answers.

Is something wrong?

Maintaining a collection of high quality questions is our top priority. If, however, you do find an error, report the problem and we'll make sure it is reviewed soon.