From 7e6f998ec6c4a62ca438b86f3236ab9e80c21a11 Mon Sep 17 00:00:00 2001 From: Ren Baoshuo Date: Sun, 27 Dec 2020 20:34:21 +0800 Subject: [PATCH] =?UTF-8?q?P7157=20=E3=80=8CdWoi=20R1=E3=80=8DPhysics=20Pr?= =?UTF-8?q?oblem?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit R44326556 --- problem/P7157/P7157.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 problem/P7157/P7157.cpp 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; +}