| 比赛 | 数据结构模板题 | 评测结果 | RRRRRRRRRRRRRRRRRRRR |
|---|---|---|---|
| 题目名称 | 数列操作C | 最终得分 | 0 |
| 用户昵称 | 健康铀 | 运行时间 | 4.114 s |
| 代码语言 | C++ | 内存使用 | 3.08 MiB |
| 提交时间 | 2025-04-15 19:05:37 | ||
#include<bits/stdc++.h>
using namespace std;
long long mod=1e9,n,m,v;
long long ksm(long long a,long long b){
int res=1;
while(b){
if(b&1==1){
res=res*a;
}
a=a*a;
if(res>mod||a>mod)
return -1;
}
return res;
}
int main(){
cin>>n>>m>>v;
long long ans=ksm(m,v-1);
if(ans==-1)
cout<<"large";
else{
ans*=v;
if(ans>mod)
cout<<"large";
else
cout<<ans;
}
return 0;
}