#include using namespace std; #define int long long #define app push_back const int p=998244353; int po(int a,int b) {if(b==0) return 1; if(b==1) return a; if(b%2==0) {int u=po(a,b/2);return (u*u)%p;} else {int u=po(a,b-1);return (a*u)%p;}} int inv(int x) {return po(x,p-2);} int32_t main() { ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); int n,q;cin>>n>>q; int ans=1; for(int i=1;i<=n;++i) {ans*=i;ans%=p;} int o=n*(n+1)/2; o%=p; for(int i=0;i