直接代公式。。。
ACcode:
#include<cstdio>
#include<cstring>
typedef long long LL;
const int MOD=1000000007;
int b,c;
LL a,ans,flag;
LL quick_pow(LL x,int y,int mod)
{
LL res=1;
while (y)
{
if (y&1) res*=x;
x*=x;
if (x>=mod) x%=mod,flag=1;
if (res>=mod) res%=mod,flag=1;
y>>=1;
}
if (res>=mod) res%=mod,flag=1;
return res;
}
int main()
{
while (~scanf("%lld %d%d",&a,&b,&c))
{
flag=0;
b=quick_pow((LL)b,c,MOD-1);
a=quick_pow(a,b+(MOD-1)*flag,MOD);
printf("%lld\n",a);
}
return 0;
}