[GESP202412 二级] 寻找数字

Luogu
IDLGB4064
Time1000ms
Memory512MB
DifficultyP1
2024GESP
小杨有一个正整数 $a$,小杨想知道是否存在一个正整数 $b$ 满足 $a=b^4$。 ## Input 第一行包含一个正整数 $t$,代表测试数据组数。 对于每组测试数据,第一行包含一个正整数代表 $a$。 ## Output 对于每组测试数据,如果存在满足条件的正整数 $b$,则输出 $b$,否则输出 $-1$。 [samples] ## Background 对应的选择、判断题:<https://ti.luogu.com.cn/problemset/1166> ## Note 对于全部数据,保证有 $1\leq t\leq 10^5$,$1\leq a_i\leq 10^8$。
Samples
Input #1
3
16
81
10
Output #1
2
3
-1
API Response (JSON)
{
  "problem": {
    "name": "[GESP202412 二级] 寻找数字",
    "description": {
      "content": "小杨有一个正整数 $a$,小杨想知道是否存在一个正整数 $b$ 满足 $a=b^4$。",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 524288
    },
    "difficulty": {
      "LuoguStyle": "P1"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB4064"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "小杨有一个正整数 $a$,小杨想知道是否存在一个正整数 $b$ 满足 $a=b^4$。\n\n## Input\n\n第一行包含一个正整数 $t$,代表测试数据组数。\n\n对于每组测试数据,第一行包含一个正整数代表 $a$。\n\n## Output\n\n对于每组测试数据,如果存在满足条件的正整数 $b$,则输出 $b$,否则输出 $-1$。\n\n[samples]\n\n## Background\n\n对应的选择、判断...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments