[GESP202412 二级] 寻找数字
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.
题目描述
小杨有一个正整数 a,小杨想知道是否存在一个正整数b满足a=b4。
输入格式
第一行包含一个正整数n,代表测试数据组数。
对于每组测试数据,第一行包含一个正整数代表a。
输出格式
每组测试数据,对于给定的a,如果存在一个正整数b满足a=b4,输出正整数b,如果不存在输出-1
样例
3
16
81
10
2
3
-1
数据规模与约定
对于全部数据,保证有 。1<=t<=105,1<=a<=108。
C++5月[GESP真题测二级]
- Status
- Done
- Rule
- OI
- Problem
- 5
- Start at
- 2025-5-29 20:00
- End at
- 2025-6-7 4:00
- Duration
- 1.5 hour(s)
- Host
- Partic.
- 2