@C++考级 一题超时 一题错了!!! 完了

寻找数字

#include<bits/stdc++.h>
using namespace std;
int main () {
    int t,num;
    cin >> t;
    while (t --) {
    	cin >> num;
    	int x = int(sqrt(sqrt(num)));
    	if (pow(x,4) == num) {
    		cout << x;
		}
		else {
			cout << -1;
		}
	}
	return 0;
}