## BZOJ2242 计算器

#### 题目大意

1. 给定y,z,p,计算Y^Z Mod P 的值；
2. 给定y,z,p，计算满足xy≡ z ( mod P )的最小非负整数；
3. 给定y,z,p，计算满足y^x ≡ z ( mod P)的最小非负整数。

#### Solution

$y^x=y^{im-j}\equiv z(mod p)$即$y^{im} \equiv zy^j (mod p)$

### 相关文章

##### 4 条评论
1. I have to express appreciation to the writer just for bailing me out of this condition. As a result of surfing throughout the the web and getting concepts which were not helpful, I believed my life was over. Existing without the presence of strategies to the problems you’ve solved by way of the guideline is a critical case, as well as the kind which might have in a negative way damaged my entire career if I had not discovered your website. That capability and kindness in taking care of the whole thing was important. I am not sure what I would’ve done if I hadn’t come across such a thing like this. I can now look ahead to my future. Thanks very much for your reliable and sensible guide. I will not think twice to refer your blog to any person who should have care on this matter.

2. A lot of thanks for all of your efforts on this web page. Gloria really loves going through research and it is simple to grasp why. All of us notice all of the lively method you give rewarding suggestions via this web site and even increase contribution from other people on this subject so my daughter is always starting to learn a lot. Take pleasure in the remaining portion of the year. You are always conducting a fantastic job.