QOJ.ac

QOJ

Límite de tiempo: 4 s Límite de memoria: 256 MB Puntuación total: 100

#959. Кратне?

Estadísticas

Для заданого цілого числа $n$ послідовність називається хорошою, якщо її елементи належать $[1,n]$ і суми всіх її непорожніх підпослідовностей (не обов'язково неперервних) не діляться на $n$.

Обчисліть кількість хороших послідовностей довжини $n-k$ за модулем $998\,244\,353$.

Вхідні дані

Єдиний рядок вхідних даних містить два цілі числа $n$ та $k$ ($1 \le k \le n/4 < n < 998\,244\,353$).

Вихідні дані

Виведіть одне число — відповідь на задачу.

Приклади

Вхідні дані 1

4 1

Вихідні дані 1

2

Вхідні дані 2

9 2

Вихідні дані 2

48

Вхідні дані 3

222222222 222222

Вихідні дані 3

851798824

Editorials

IDTypeStatusTitlePosted ByLast UpdatedActions
#319EditorialOpen题解jianglyView

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.