We have to find the remainder when $\overbrace{11\ldots1}^{124 \text{ times}}$ is divided by 271 .
In this I thought of using chinese remainder theorem or congruency/modular arithmetic .
But I could not get any good start .
I found a similar question .
What will be the remainder when 111...(123 times) is divided by 271?
Finding the remainder of $\overbrace{11\ldots1}^{123 \text{ times}}$ divided by $271$
But in that I could not understand how they got the idea that of 271x41
The number in question is $a=(10^{124}-1)/9$.
We find $10^3\equiv187$, $10^4\equiv244$, $10^5\equiv 1\pmod{271}$. Therefore $10^{124}\equiv 244\pmod{271}$. So $9a\equiv 243\pmod{271}$. I'll leave solving this congruence to you...