1 solutions

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

    Information

    ID
    2211
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    8
    Tags
    # Submissions
    37
    Accepted
    6
    Uploaded By