题目描述
<div class="Section0"> <p class="p0" style="text-indent:24.0000pt;"> <span style="line-height:1.5;">This year MK is </span><span style="line-height:1.5;">5 years old. So he decides to learn some </span><a href="app:ds:arithmetic">arithmetic</a><span style="line-height:1.5;">. But he was confused by how to write the brackets. He has already known that the brackets should match when writing them correctly. Such as “()(())” is correct but “())(” is not.</span> </p> <p class="p0" style="text-indent:24.0000pt;"> The problem is that, if there are N pairs of brackets, how many ways that MK can write them correctly? </p> <p class="p0"> <br /> </p> </div>
输入格式
<span> There are several test cases. Each case contains a number N (1 <= N <= 1000) indicating the pairs of brackets.</span>
输出格式
<span>For each case, please output the answer mod 1,000,000,007.</span>
样例
样例输入 1
5
7
样例输出 1
42
429
提交代码
请先登录后提交
🤖 AI 解题助手
DeepSeek
就绪