1 solutions

  • 0
    @ 2025-5-9 19:19:44
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int T;
    	cin>>T;
    	while(T--)
    	{
    		int n;
    		cin>>n;
    		int ans=-1;
    		for(int i=1;i*i*i*i<=n;i++)
    		{
    			if(i*i*i*i==n)
    			{
    				ans=i; 
    				break;
    			}
    		}
    		cout<<ans<<endl;
    	}
    	return 0;
    }
    
    • 1

    Information

    ID
    2211
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    9
    Tags
    # Submissions
    15
    Accepted
    3
    Uploaded By