#D. 【GESP202412C++二级】 寻找数字

    Type: Default 1000ms 256MiB

【GESP202412C++二级】 寻找数字

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

小杨有一个正整数 ,小杨想知道是否存在一个正整数b满足a=b4

输入格式

第一行包含一个正整数n,代表测试数据组数。

对于每组测试数据,第一行包含一个正整数代表a。

输出格式

对于每组测试数据,如果存在满⾜条件的正整数b ,则输出b ,否则输出-1

样例

3
16
81
10
2
3
-1

数据规模与约定

对于全部数据,保证有 。1<=t<=105,1<=a<=108

20260404周六PY随堂测试

Not Attended
Status
Done
Rule
Ledo
Problem
4
Start at
2026-4-4 11:10
End at
2026-4-4 12:22
Duration
1.2 hour(s)
Host
Partic.
5