Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //misis4 taskC
- #define _CRT_SECURE_NO_WARNINGS
- #include <iostream>
- #include <cstdio>
- #include <vector>
- #include <cmath>
- #include <string>
- #include <algorithm>
- #include <string>
- #include <deque>
- #include <iomanip>
- #include <cstddef>
- #define F first
- #define S second
- using namespace std;
- const long double eps = 0.000000005;
- const long double pi = 3.1415926535897932;
- const long double inf = 1e9;
- int main()
- {
- ios_base::sync_with_stdio(0);
- //freopen("bigwall.in", "r", stdin); freopen("bigwall.out", "w", stdout);
- //freopen("input.txt", "r", stdin);
- int a, b;
- cin >> a >> b;
- cout << (a + b) * (b - a + 1) / 2 << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement