据说是个公式题.
Code
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
const long long mod = 998244353;
inline long long Pow(long long a, long long b) {
long long res = 1, base = a;
while (b) {
if (b & 1)
res = res * base % mod;
base = base * base % mod;
b >>= 1;
}
return res;
}
long long n, m;
int main() {
scanf("%lld", &n);
printf("%lld", n * (n + 1) % mod * Pow(2, n - 2) % mod);
return 0;
}