这道题目的数据是不是有点……
#include<bits/stdc++.h>
using namespace std;
inline long long read()
{
long long x=0,f=0;char ch=getchar();
while(ch<'0'||ch>'9')
{
ch=getchar();
}
while(ch>='0'&&ch<='9')
{
x=(x<<3)+(x<<1)+(ch^48),ch=getchar();
}
return x;
}
int n,m,T;
bool b;
int main()
{
T=read();
for(int z=0;z<T;z++)
{
n=read();
m=read();
if(m>6||m>n+1)
{
putchar('Y');
putchar('e');
putchar('s');
putchar('\n');
}
else
{
b=true;
for(int y=2;y<=m;y++)
{
if(n%y!=y-1)
{
putchar('Y');
putchar('e');
putchar('s');
putchar('\n');
b=false;
break;
}
}
if(b)
{
putchar('N');
putchar('o');
putchar('\n');
}
}
}
return 0;
}
这一份能 AC 的代码,但是
if(m>6){cout<<"Yes"};
请求取消AC