2685:I won't tell you this is about number theory

题目描述
To think of a beautiful problem description is so hard for me that let's just drop them off. :)
Given four integers a,m,n,k,and S = gcd(a^m-1,a^n-1)%k,calculate the S.

输入解释
The first line contain a t,then t cases followed.
Each case contain four integers a,m,n,k(1<=a,m,n,k<=10000).
输出解释
One line with a integer S.
输入样例
1
1 1 1 1
输出样例
0
来自杭电HDUOJ的附加信息
Author Teddy
Recommend yifenfei

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-2685

最后修改于 2020-10-25 22:55:55 UTC 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)

·

·

·

·

登陆或注册以提交代码