#include <iostream>
#include<stdio.h>
#include<algorithm>
#include<string.h>
#include<math.h>
#include<vector>
#define ENTER printf("\n");
//快速打印一个数组
#define ll long long
#define NUM 100
#define MOD 1000
using namespace std;
int t;
int n, m;
int f(int n, int m)
{
if (n > m)
{
int t = n;
n = m;
m = t;
}
if (n == m)
return 1;
return f(n, m - n) + 1;
}
//构造函数 析构函数怎么打印出地址
int main()
{
scanf("%d", &t);
while (t--)
{
scanf("%d%d", &n, &m);
printf("%d\n", f(n, m));
}
}
08-29
463
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-05
336
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交