{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003e\n There are $n$ apples on a tree, numbered from $1$ to $n$.\u003cbr\u003e\n Count the number of ways to pick \u003cb\u003eat most\u003c/b\u003e $m$ apples.\u003cbr\u003e\n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line of the input contains an integer $T$ $(1 \\le T \\le 10 ^ 5)$ denoting the number of test cases.\u003cbr\u003e\nEach test case consists of one line with two integers $n, m$ $(1 \\le m \\le n \\le 10 ^ 5)$.\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each test case, print an integer representing the number of ways modulo $10 ^ 9 + 7$."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e2\r\n5 2\r\n1000 500\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e16\r\n924129523\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}