Wrong Answer
foo.c: In function 'main': foo.c:20:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] scanf("%llu%llu", &n, &k); ^~~~~~~~~~~~~~~~~~~~~~~~~
代码
#include<stdio.h>
#include<stdlib.h>
typedef unsigned long long ULL;
const int MOD = 1E9 + 7;
ULL quick(ULL a, ULL b)
{
ULL ans = 1;
a = a % MOD;
while (b != 0)
{
if (b & 1) ans = (ans * a) % MOD;
b >>= 1;
a = (a * a) % MOD;
}
return ans;
}
int main()
{
ULL n, k;
scanf("%llu%llu", &n, &k);
printf("%llu", quick(n + 1, k));
return 0;
}
信息
- 递交者
- 类型
- 递交
- 题目
- P1005 hitwh 2019 新生赛 F Ramen and his faculty
- 语言
- C
- 递交时间
- 2020-12-21 20:32:31
- 评测时间
- 2020-12-21 20:32:31
- 评测机
- 分数
- 0
- 总耗时
- 4ms
- 峰值内存
- 296.0 KiB