QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#132253 | #5574. Julienne the Deck | tselmegkh# | WA | 1ms | 3576kb | C++20 | 876b | 2023-07-29 11:18:56 | 2023-07-29 11:18:59 |
Judging History
answer
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <iomanip>
using namespace std;
const int N = 2e5 + 5, inf = 1e9;
#define pb push_back
#define mp make_pair
#define ll long long
#define ff first
#define ss second
#define all(a) a.begin(),a.end()
#define sz(x) (int)x.size()
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
const int mod = 998244353;
void solve(){
ll n;
cin >> n;
if(n < 3){
cout << n << '\n';
return;
}else {
cout << (n * 2) % mod << '\n';
}
}
int main(){
ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
int t = 1;
// cin >> t;
while(t--){
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3460kb
input:
1
output:
1
result:
ok 1 number(s): "1"
Test #2:
score: 0
Accepted
time: 1ms
memory: 3576kb
input:
1000000000000
output:
516560941
result:
ok 1 number(s): "516560941"
Test #3:
score: 0
Accepted
time: 1ms
memory: 3460kb
input:
3
output:
6
result:
ok 1 number(s): "6"
Test #4:
score: 0
Accepted
time: 1ms
memory: 3416kb
input:
4
output:
8
result:
ok 1 number(s): "8"
Test #5:
score: -100
Wrong Answer
time: 1ms
memory: 3460kb
input:
2
output:
2
result:
wrong answer 1st numbers differ - expected: '1', found: '2'