#define ENABLE_DEBUG 1 // Kana's kitchen {{{ #include #define ALL(v) std::begin(v), std::end(v) #define REP(i, k) for (decltype(k) i = 0; i < k; i++) #define LOOP(k) REP (ngtkana_is_a_genius, k) using i32 = std::int_least32_t; using i64 = std::int_least64_t; using u32 = std::uint_least32_t; using u64 = std::uint_least64_t; using usize = std::size_t; template using pair = std::pair; template using diag_pair = std::pair; template using tuple = std::tuple; template using vec = std::vector; template using numr = std::numeric_limits; #ifdef NGTKANA #include #else #define DEBUG(...)(void)0 #endif /*}}}*/ int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); std::cout << std::setprecision(15) << std::fixed; u64 N, n; std::cin >> N >> n; vec pinv(n), ckd(n), fact(n, 1); for (u64 i=1; i