QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#604291 | #9309. Graph | tanghao | WA | 0ms | 3824kb | C++14 | 364b | 2024-10-02 09:10:34 | 2024-10-02 09:10:34 |
Judging History
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;
}
Details
Tip: Click on the bar to expand more detailed information
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'