QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#604291#9309. GraphtanghaoWA 0ms3824kbC++14364b2024-10-02 09:10:342024-10-02 09:10:34

Judging History

你现在查看的是最新测评结果

  • [2024-10-02 09:10:34]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3824kb
  • [2024-10-02 09:10:34]
  • 提交

answer

# include <bits/stdc++.h>
# define pb push_back
# define int long long
using namespace std;

const int mod = 998244353;

int ksm(int x, int p){
	int ret = 1;
	while (p){
		if (p & 1) ret = ret * x % mod;
		x = x * x % mod;
		p >>= 1;
	}
	return ret;
}

signed main(){
	int n;
	scanf("%lld", &n);
	printf("%lld\n", ksm(2, n-1));
	return 0;
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3780kb

input:

4

output:

8

result:

ok answer is '8'

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3824kb

input:

2

output:

2

result:

wrong answer expected '1', found '2'