QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#575472 | #9309. Graph | sevenki# | WA | 0ms | 3724kb | C++17 | 355b | 2024-09-19 14:37:18 | 2024-09-19 14:37:18 |
Judging History
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'