定义 f(x,m)=x mod mf(x,m)= x \bmod mf(x,m)=xmodm。
有一个序列 aaa,满足 a1=xa_1=xa1=x,ai=f(ai−12,m)a_i=f(a_{i-1}^2,m)ai=f(ai−12,m) 。
求
使用您的 gxyz 通用账户