小ZZZ上了幼儿园,他的数学作业不会做,只好找你做。
给定整数nnn,mmm,ooo,求nmon^{m^o}nmo
但他学习了oioioi 不是说好的才幼儿园吗 ,所以他要在结果超过longlonglong longlonglong 范围的时候输出−1-1−1,其余情况输出答案。
一行三个整数n,m,on,m,on,m,o
一行一串字符或−1-1−1
2 2 5
4294967296
5 4 4
-1
对于100%的数据,1≤n,m,o≤51 \le n,m,o \le 51≤n,m,o≤5
提示:这里可以用到自然溢出
By signing up a acjudge universal account, you can submit code and join discussions in all online judging services provided by us.
Using your acjudge universal account