5532: 【GESP202412 二级】寻找数字
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:1
Solved:1
Description
小杨有一个正整数 $a$,小杨想知道是否存在一个正整数 $b$ 满足 $a=b^4$。
Input
第一行包含一个正整数 $t$,代表测试数据组数。
对于每组测试数据,第一行包含一个正整数代表 $a$。
对于每组测试数据,第一行包含一个正整数代表 $a$。
Output
对于每组测试数据,如果存在满足条件的正整数 $b$,则输出 $b$,否则输出 $-1$。
Sample Input Copy
3
16
81
10
Sample Output Copy
2
3
-1
HINT
对于全部数据,保证有 $1\leq t\leq 10^5$,$1\leq a_i\leq 10^8$。