TLE & WA
查看原帖
TLE & WA
1280343
a111111111111楼主2024/5/9 21:25

求助 :

![测试点]("C:\Users\PC\Pictures\Screenshots\屏幕截图 2024-05-09 212145.png")

程序

#include<bits/stdc++.h>
using namespace std; using LL=unsigned long long;
bool f(LL n)
{
	for(LL X=1,x;X*X<=n;X++){x=X*X; if(x==n) return 1;}
	return 0;
}
int main()
{
	ios::sync_with_stdio(false); cin.tie(0); LL n; cin>>n;
	for(LL x=0;x<n;x++) if(f(x*n)) return cout<<x,0;
	return 0;
}
2024/5/9 21:25
加载中...