QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#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;
}
Details
Tip: Click on the bar to expand more detailed information
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'