QOJ.ac

QOJ

Limite de temps : 4 s Limite de mémoire : 256 MB Points totaux : 100

#959. 배수?

Statistiques

정수 $n$이 주어졌을 때, 어떤 수열의 모든 원소가 $[1, n]$에 속하고, 비어 있지 않은 모든 부분 수열(연속적일 필요는 없음)의 합이 $n$으로 나누어떨어지지 않으면 그 수열을 좋다고(good) 부릅니다.

길이가 $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题解jiangly2025-12-14 07:04:22View

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.