#include #include #include #include using namespace std; using namespace atcoder; using mint = modint998244353; using ll = long long; mint pw(mint a,ll x){ if(x<0) a = 1/mint(a); x = abs(x); mint ret = 1; while(x){ if(x&1) (ret *= a); x /= 2; a *= a; } return ret; } map,mint> mp; ll mx = -10000; mint solve(ll z,ll dig){ if(z<0 || dig<0) return 0; if(dig==0) return 1; if(z==0) return mint(1LL<> m; int d = 0; ll n = m; while(n){ n /= 2; d++; } mint ans = pw(2,(1LL<<(d - 1)) - 1) - 1 + pw(2,1LL<<(d - 1)) - pw(2,(1LL<