记录详情

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);
  ^~~~~~~~~~~~~~~~~~~~~~~~~
# 状态 耗时 内存占用
#1 Wrong Answer Read {0}, expect {1}. ["537694249","969325547"] 0ms 288.0 KiB
#2 Wrong Answer Read {0}, expect {1}. ["673424290","911662646"] 0ms 296.0 KiB
#3 Wrong Answer Read {0}, expect {1}. ["306959736","997910374"] 0ms 256.0 KiB
#4 Wrong Answer Read {0}, expect {1}. ["432958628","671405386"] 0ms 256.0 KiB
#5 Wrong Answer Read {0}, expect {1}. ["433227943","575089383"] 0ms 256.0 KiB

代码

#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