{"problem":{"name":"~K Perm Counting","description":{"content":"Snuke loves permutations. He is making a permutation of length $N$. Since he hates the integer $K$, his permutation will satisfy the following: *   Let the permutation be $a_1, a_2, ..., a_N$. For ea","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"agc005_d"},"statements":[{"statement_type":"Markdown","content":"Snuke loves permutations. He is making a permutation of length $N$.\nSince he hates the integer $K$, his permutation will satisfy the following:\n\n*   Let the permutation be $a_1, a_2, ..., a_N$. For each $i = 1,2,...,N$, $|a_i - i| \\neq K$.\n\nAmong the $N!$ permutations of length $N$, how many satisfies this condition?\nSince the answer may be extremely large, find the answer modulo $924844033$(prime).\n\n## Constraints\n\n*   $2 ≦ N ≦ 2000$\n*   $1 ≦ K ≦ N-1$\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$ $K$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"agc005_d","tags":[],"sample_group":[["3 1","2\n\n$2$ permutations $(1, 2, 3)$, $(3, 2, 1)$ satisfy the condition."],["4 1","5\n\n$5$ permutations $(1, 2, 3, 4)$, $(1, 4, 3, 2)$, $(3, 2, 1, 4)$, $(3, 4, 1, 2)$, $(4, 2, 3, 1)$ satisfy the condition."],["4 2","9"],["4 3","14"],["425 48","756765083"]],"created_at":"2026-03-03 11:01:14"}}