-->
当前位置:首页 > 题库

PROGRAMMING:greatest common divisor

Luz5年前 (2021-05-10)题库442
This paper gives the result of finding the greatest common divisor module P of $$a ^ {m} - $$B ^ {m} $$and $$a ^ {n} - $$B ^ {n} $$by integer a, B, m, N, P, and a and B are coprime, a > B.
###Input format:
The input contains five 32-bit unsigned integers a, B, m, N and P in one line, and P > 1.
###Output format:
The output gives the result of the calculation in one line.
###Input sample 1:
```in
8 7 5 4 100
```
###Output sample 1:
```out
one
```
###Input sample 2:
```in
11 5 6 3 20
```
###Output sample 2:
```out
six
```







answer:If there is no answer, please comment