diff --git a/problem/P7157/P7157.cpp b/problem/P7157/P7157.cpp new file mode 100644 index 00000000..0d1b2bbf --- /dev/null +++ b/problem/P7157/P7157.cpp @@ -0,0 +1,10 @@ +#include + +using namespace std; + +int main() { + long long n, k; + cin >> n >> k; + cout << n * (n - 1) / 2 - k << endl; + return 0; +}