为什么超时?
查看原帖
为什么超时?
1724170
zhapenghui楼主2025/7/26 11:18

洛谷上过了,请问哪位大佬是 信息学奥赛一本通 的用户,帮我看一下,为什么有两个点超时

#include<bits/stdc++.h>
using namespace std;
int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	
	int a;
	cin>>a;
	while (a--)
	{
		int b;
		cin>>b;
		int j;
		for (j=1;j*j*j*j<b;j++)
		continue;
		
		if (j*j*j*j==b)
		cout<<j;
		else
		cout<<-1;
		cout<<endl;	
	}	
	return 0;
}
2025/7/26 11:18
加载中...