問題一覧 > 通常問題

No.1126 SUM

レベル : / AI推定難易度 : 575 / 実行時間制限 : 1ケース 1.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 144
作問者 : PCTprobability / テスター : kozy
お気に入りにしたユーザー ProblemId : 4815 / 自分の提出
問題文最終更新日: 2020-07-24 22:08:59
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original

Problem Statement

You are given positive integers $N,M$.
Here, $N \le M$.
Find the sum of the $M-N+1$ numbers from \( {}_N C_N \) to \( {}_M C_N \).
Since the answer can be very large, output the remainder when divided by $1000000007$.
The test cases have been corrected. (7/24 22:04)
The constraints have been corrected. (7/24 22:08)

Input

$N M$

All inputs are integers.
$1 \le N,M \le 100000=10^5$
$N \le M$

Output

Print a newline at the end.

Sample

Sample 1
Input
1 3
Output
6

Sample 2
Input
12 20
Output
203490

Sample 3
Input
100 200
Output
256185103

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。