#SDNU1682. easy problem Ⅲ
easy problem Ⅲ
Description
请计算对于给出的,与的最大公约数。 题目保证互质,且
Format
Input
多组输入,两个整数
Output
与的最大公约数。,保证结果不超过
Samples
3 2 2 3
1
请计算对于给出的N,M,aN−bN与aM−bM的最大公约数。 题目保证a,b互质,且a>b
多组输入,两个整数a,b,N,M (1≤a,b≤500,1≤N,M≤50)
aN−bN与aM−bM的最大公约数。,保证结果不超过263−1
3 2 2 3
1
By signing up a GENESIS universal account, you can submit code and join discussions in all online judging services provided by us.