【数据过水】1 不是质数
查看原帖
【数据过水】1 不是质数
641953
Determination_Y楼主2024/8/9 22:05

此代码珂以通过本题所有数据:

... //Some Search_Primes
bool check(int x){
	if(x>1e7) return false;
	for(int p=1;p<=tot and Prime[p]*Prime[p]<=x;p++){
		if(x%Prime[p]==0) return false;
	}return true;
}
... //Some ODT

不要在意这种 SB 的实现方式。

Hack:

1 1
1
Q 1 1

应该输出 0,代码输出 1。

2024/8/9 22:05
加载中...