'commit'
This commit is contained in:
23
TangDou/LanQiaoBei/LanQiao14GuoSai/Test.cpp
Normal file
23
TangDou/LanQiaoBei/LanQiao14GuoSai/Test.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
const int MOD = 1000000007;
|
||||
typedef long long LL;
|
||||
/*
|
||||
3 5 4
|
||||
|
||||
36
|
||||
*/
|
||||
int main() {
|
||||
LL n, m, k;
|
||||
cin >> n >> m >> k;
|
||||
// k=4 m=5
|
||||
LL a = ((k - 1) * (m - k + 1)) % MOD;
|
||||
|
||||
// LL b = 0;
|
||||
// for (LL i = 1; i <= n; i++) b = (b + i) % MOD;
|
||||
LL b = (n * (n + 1) / 2) % MOD;
|
||||
|
||||
cout << (a * b) % MOD << endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user