remainder=?
5^{625}/7=?
5 mod 7 = 5
25 mod 7 = 4
125 mod 7 = 6
625 mod 7 = 2
3125 mod 7 = 3
15625 mod 7 = 1
If we take number pattern repeats like this { 5 4 6 3 2 1.........}
for 5^624 mod 7 = 1 so next number will be 5 which is 5^625