QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#575472#9309. Graphsevenki#WA 0ms3724kbC++17355b2024-09-19 14:37:182024-09-19 14:37:18

Judging History

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

  • [2024-09-19 14:37:18]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3724kb
  • [2024-09-19 14:37:18]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define int long long
const int MOD=998244353;
int fast_pow(int x,int num){
	int ans=1;
	while(num){
		if(num&1) ans=ans*x%MOD;
		x=x*x%MOD;
		num>>=1;
	}
	return ans;
}
signed main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int n;
	cin>>n;
	cout<<fast_pow(2,n-1)<<endl;
}

詳細信息

Test #1:

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

input:

4

output:

8

result:

ok answer is '8'

Test #2:

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

input:

2

output:

2

result:

wrong answer expected '1', found '2'