I used to solve it by binomial theorem method, but i had studied the basics of this theory in class 10th and thought that it might be helpful in solving such type of questions. I used to search mod concept and then it would show modulus function concept 😂. Finally today it suggested me the correct video. Really helpful. In fact, a really powerful concept in mathematics to find remainders💪 Great explanation too.