tuki2501

So28_Bai1.cpp

Nov 4th, 2021
1,072
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. typedef long long ll;
  5.  
  6. signed main() {
  7.   cin.tie(0)->sync_with_stdio(0);
  8.   long long n, s;
  9.   cin >> n >> s;
  10.   cout << n * (n + 1) / 2 - s << '\n';
  11. }
  12.  
Advertisement
Add Comment
Please, Sign In to add comment