Logo
(追記) (追記ここまで)

18969번 - Different Summands Counting 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 256 MB74302840.580%

문제

Consider all ordered partitions of a positive integer $n$ into $m$ positive summands: $n = a_1 + a_2 + \ldots + a_m$. Let $f(a_1, a_2, \ldots, a_m)$ be the number of different integers among $a_1, a_2, \ldots, a_m$. Find the sum of $f(a_1, a_2, \ldots, a_m)$ over all ordered partitions of the number $n,ドル and print it modulo 998ドル,244円,353円$.

Two ordered partitions $a_1 + a_2 + \ldots + a_m = n$ and $b_1 + b_2 + \ldots + b_m = n$ are considered different if there is an index $i \in \{1, 2, \ldots, m\}$ such that $a_i \neq b_i$.

입력

The only line of input contains two integers $n$ and $m$ (1ドル \le n \le 10^{18},ドル 1ドル \le m \le 500,ドル $m \le n$).

출력

Print the answer modulo 998ドル,244円,353円$.

제한

예제 입력 1

10 2

예제 출력 1

17

예제 입력 2

20 4

예제 출력 2

3413

힌트

출처

Camp > Petrozavodsk Programming Camp > Summer 2018 > Day 3: MIPT Contest D번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /