#include #include #include #include /* 計算量: O(M^2 + M\log{M}\log{K}) */ /* macro */ #define rep(i, a, n) for (int i = (int)(a); i < (int)(n); i++) #define rrep(i, a, n) for (int i = ((int)(n - 1)); i >= (int)(a); i--) /* macro end */ namespace ebi { template class modint { using u64 = std::uint_fast64_t; public: u64 a; constexpr modint(const u64 x = 0) noexcept : a(x % Modulus) {} constexpr u64 &value() noexcept { return a; } constexpr u64 &val() noexcept { return a; } constexpr const u64 &value() const noexcept { return a; } constexpr modint operator+(const modint rhs) const noexcept { return modint(*this) += rhs; } constexpr modint operator-(const modint rhs) const noexcept { return modint(*this) -= rhs; } constexpr modint operator*(const modint rhs) const noexcept { return modint(*this) *= rhs; } constexpr modint operator/(const modint rhs) const noexcept { return modint(*this) /= rhs; } constexpr modint &operator+=(const modint rhs) noexcept { a += rhs.a; if (a >= Modulus) { a -= Modulus; } return *this; } constexpr modint &operator-=(const modint rhs) noexcept { if (a < rhs.a) { a += Modulus; } a -= rhs.a; return *this; } constexpr modint &operator*=(const modint rhs) noexcept { a = a * rhs.a % Modulus; return *this; } constexpr modint &operator/=(modint rhs) noexcept { u64 exp = Modulus - 2; while (exp) { if (exp % 2) { *this *= rhs; } rhs *= rhs; exp /= 2; } return *this; } constexpr modint operator-() const { return modint() - *this; } bool operator==(const u64 rhs) { return a == rhs; } bool operator!=(const u64 rhs) { return a != rhs; } constexpr modint &operator++() { a++; if (a == mod()) a = 0; return *this; } constexpr modint &operator--() { if (a == 0) a = mod(); a--; return *this; } modint pow(u64 n) const noexcept { modint res = 1; modint x = a; while (n > 0) { if (n & 1) res *= x; x *= x; n >>= 1; } return res; } modint inv() const { return pow(Modulus - 2); } static u64 mod() { return Modulus; } }; using modint998244353 = modint<998244353>; using modint1000000007 = modint<1000000007>; template std::ostream &operator<<(std::ostream &os, modint a) { return os << a.val(); } } // namespace ebi using mint = ebi::modint998244353; int main() { int n, m, k; std::cin >> n >> m >> k; std::vector dp(m + 1, std::vector(m, 0)); dp[0][0] = 1; rep(i, 0, m) { rep(j, 0, m) { if (j + 1 < m) dp[i + 1][j + 1] += dp[i][j] + dp[i + 1][j]; if (2 * j + 2 < m) dp[i + 1][2 * j + 2] -= dp[i][j]; } } std::vector ret(m + 1, 0); std::vector fact(m + 1, 1), inv(m + 1, 1); rep(i, 0, m) { fact[i + 1] = fact[i] * mint(n - i); inv[i + 1] = inv[i] * mint(i + 1); } inv[m] = inv[m].inv(); rrep(i, 0, m) { inv[i] = inv[i + 1] * mint(i + 1); } auto comb = [&](int r) -> mint { assert(0 <= r && r <= m); return fact[r] * inv[r]; }; rep(i, 0, std::min(n, m) + 1) { rep(j, 0, m) { ret[j + 1] += dp[i][j] * comb(i); } } std::vector now(m + 1, 0); now[1] = 1; auto mul = [&m](const std::vector &lhs, const std::vector &rhs) -> std::vector { std::vector res(m + 1, 0); for (int i = 1; i < m + 1; i++) { for (int j = 1; i * j < m + 1; j++) { res[i * j] += lhs[i] * rhs[j]; } } return res; }; while (k > 0) { if (k & 1) { now = mul(now, ret); } ret = mul(ret, ret); k >>= 1; } mint ans = 0; for (int i = 0; i < m + 1; i++) { ans += now[i]; } std::cout << ans.val() << '\n'; }