20分代码,#1TLE,其他WA
查看原帖
20分代码,#1TLE,其他WA
1127424
damuzhi楼主2024/7/3 09:21
#include <bits/stdc++.h>

using namespace std;

int change(int a,int b)
{
    int c = abs(a-b);
    return c;
}

int main()
{
    int a,b;
    cin >> a >> b;
    while(!(a <= 10) && !(b <= 10))
    {
        int c = change(a,b);
        if(a > b)
            a = c;
        else
            b = c;
    }
    long long x;
    long long d = 1;
    while(d % a != 0){
        d += b;
    }
    x = d / a;
    cout << x;
    return 0;
}
2024/7/3 09:21
加载中...