HDU 7050. Link with Limit
链接
https://acm.hdu.edu.cn/showproblem.php?pid=7050
题意
Link has a function $f(x)$, where $x$ and $f(x)$ are both integers in $[1,n]$.
Let $f_n(x)=f(f_{n−1}(x))$ and $f_1(x)=f(x)$, he define the power of a number $x$ as:
$$g(x)=\lim_{n\rightarrow+\infty}\frac{1}{n}\sum_{i=1}^nf_i(x)$$
He wants to know whether $x$ has the same power for all $x\in[1,n]$.