Wrong Answer
/in/foo.c: In function 'main': /in/foo.c:15:21: warning: unused variable 'ans' [-Wunused-variable] long long int k,n,ans; ^~~
代码
#include<stdio.h>
#include<string.h>
#include<math.h>
#define MOD 1000000007
long long int fastpow(long long int base,long long int n){
int ans=1;
while(n){
if(n&1)ans*=base%MOD;
base*=base;
n>>=1;
}
return ans%MOD;
}
int main(){
long long int k,n,ans;
scanf("%lld%lld",&k,&n);
printf("%lld",fastpow(k+1,n));
return 0;
}
信息
- 递交者
- 类型
- 递交
- 题目
- P1005 hitwh 2019 新生赛 F Ramen and his faculty
- 语言
- C
- 递交时间
- 2020-12-17 21:10:45
- 评测时间
- 2020-12-17 21:10:45
- 评测机
- 分数
- 0
- 总耗时
- 4ms
- 峰值内存
- 216.0 KiB