1 条题解
-
1
202502cj14 (张子瑞) LV 8 @ 2025-03-20 20:22:51
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <vector>
#include <deque>
using namespace std;namespace dts
{
typedef long long ll;ll n;
void main()
{
scanf("%lld",&n);
printf("%lld\n",n*(n+1)*(2*n+1)/6);
}
};int main()
{
dts::main();
}
- 1