B. 快来写代码了

    传统题 1000ms 256MiB

快来写代码了

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Background

Special for beginners, ^_^

Description

给出下面一段程序,每次运行输入一个n,输出结果。由于结果很大,请对1e9+7取模。

#include<bits/stdc++.h>
using namespace std;
int ans, n;
void A()
{
	ans++; 
}
void B(int j)
{
	for(int i = 0; i < j; i++)
		A();
}
void L(int x, int i)
{
	for(int j = i; j <= x; j++)
		B(j);
}
int main()
{
	cin >> n;
	for(int i = 1; i <= n; i++)
		L(n, i);
	cout << ans;
}

Format

Input

输入每行一个n(不超过1e10)。

Output

每行输出一个对1e9+7取模后的ans。.

Samples

1
2
1
5

Limitation

1s, 1024KiB for each test case.

25暑假信奥数学入门组C第二场

未参加
状态
已结束
规则
IOI
题目
5
开始于
2025-7-24 10:00
结束于
2025-7-24 20:00
持续时间
10 小时
主持人
参赛人数
9