T1
一
對於 \(\operatorname{mod}c\) ,相當於對 \(\lfloor {a^{b}\over c} \rfloor\) 一直減 \({c}\) ,直到不能減為止 ,
\(\lfloor {a^{b}\over c} \rfloor {\%c=}\lfloor {a^{b}\over c} -kc \rfloor =\lfloor {a^{b}-kc^{2}\over c} \rfloor =\lfloor {a^{b}modc^{2}\over c} \rfloor\)