QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#472299 | #5574. Julienne the Deck | WTR2007 | WA | 0ms | 3948kb | C++20 | 810b | 2024-07-11 15:32:15 | 2024-07-11 15:32:16 |
Judging History
answer
#include<bits/stdc++.h>
#define int long long
#define fi first
#define se second
#define MULT_TEST 0
using namespace std;
typedef long double ldb;
typedef unsigned long long ull;
const int INF = 0x3f3f3f3f;
const int MOD = 998244353;
inline int read() {
int w = 0, f = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-') f = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9') {
w = (w << 1) + (w << 3) + ch - 48;
ch = getchar();
}
return w * f;
}
inline void Solve() {
int n;
n = read();
if (n == 1 || n == 2) printf("%lld\n", n);
else printf("%lld\n", 2 * n % MOD);
}
signed main() {
int _ = 1;
#if MULT_TEST
_ = read();
#endif
while (_--) Solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3820kb
input:
1
output:
1
result:
ok 1 number(s): "1"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3728kb
input:
1000000000000
output:
516560941
result:
ok 1 number(s): "516560941"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3812kb
input:
3
output:
6
result:
ok 1 number(s): "6"
Test #4:
score: 0
Accepted
time: 0ms
memory: 3948kb
input:
4
output:
8
result:
ok 1 number(s): "8"
Test #5:
score: -100
Wrong Answer
time: 0ms
memory: 3796kb
input:
2
output:
2
result:
wrong answer 1st numbers differ - expected: '1', found: '2'