- 王小二切西瓜 2
数据
- @ 2026-9-11 11:44:36
自己推的式子,应该可能大概是对的吧?
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
long long ans=(n-1)*(n-2)*(n-3)/6;
cout<<ans;
return 0;
}
/*
--------------------
input1:
3
output1:
0
--------------------
input2:
114
output2:
234136
--------------------
input3:
1145
output3:
248878344
--------------------
input4:
11451
output4:
250121723400
--------------------
input5:
1000000
output5:
166665666668499999
--------------------
*/
欢迎hack
0 条评论
目前还没有评论...
信息
- ID
- 848
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 10
- 标签
- (无)
- 递交数
- 1
- 已通过
- 0
- 上传者