记录详情

Wrong Answer


  
# 状态 耗时 内存占用
#1 Wrong Answer 1ms 224.0 KiB
#2 Wrong Answer 1ms 220.0 KiB
#3 Wrong Answer 1ms 232.0 KiB
#4 Wrong Answer 1ms 216.0 KiB
#5 Wrong Answer 1ms 216.0 KiB

代码

#include <bits/stdc++.h>
#define int long long
#define mod 1000000007
using namespace std;
int n, k;

int ksm(int a,int b)
{
	int res = 1;
	while(b)
	{
		if(b & 1) res = res * a % mod;
		a = a * a % mod;b >>= 1;
	}
	return res;
}

signed main()
{
	cin >> n >> k;
	cout << ksm(n + 1,k) << endl;
}

信息

递交者
类型
递交
题目
P1005 hitwh 2019 新生赛 F Ramen and his faculty
语言
C++
递交时间
2020-12-17 19:44:35
评测时间
2020-12-17 19:44:36
评测机
分数
0
总耗时
8ms
峰值内存
232.0 KiB