是不是还要特判?
查看原帖
是不是还要特判?
639483
FiresonZ楼主2022/3/26 18:07
#include<iostream>
#include<array>
#include<algorithm>
#include<cmath>
#define reg register
using namespace std;
using gg=long long;
inline gg gcd(const gg &a,const gg &b)
{
	return b==0?a:gcd(b,a%b);
}
int main()
{
	freopen("math.in","r",stdin);
	freopen("math.out","w",stdout);
	ios::sync_with_stdio(false);
	cin.tie(0);
	reg bool flag=false;
	reg gg t,x,z;
	cin>>t;
	for(reg gg i=1;i<=t;i++)
	{
		cin>>x>>z;
		if(z%x!=0)
		{
			cout<<-1<<'\n';
		}
		else
		{
			cout<<-1<<'\n';
		}
	}
	return 0;
}

如题

2022/3/26 18:07
加载中...