#abc327b. B - A^A
B - A^A
Score : points
问题描述
给定一个整数 。
如果存在一个正整数 ,使得 ,则输出 的值;否则,输出 -1
。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
You are given an integer .
If there exists a positive integer such that , print its value; otherwise, output -1
.
Constraints
- is an integer.
Input
The input is given from Standard Input in the following format:
Output
If there exists a positive integer such that , print its value; otherwise, print -1
.
If there are multiple positive integers such that , any of them will be accepted.
Sample Input 1
27
Sample Output 1
3
, so print .
Sample Input 2
100
Sample Output 2
-1
There is no such that .
Sample Input 3
10000000000
Sample Output 3
10
update @ 2024/3/10 01:50:34