Advertisement
double_trouble

Untitled

Feb 25th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. //misis4 taskC
  2.  
  3. #define _CRT_SECURE_NO_WARNINGS
  4. #include <iostream>
  5. #include <cstdio>
  6. #include <vector>
  7. #include <cmath>
  8. #include <string>
  9. #include <algorithm>
  10. #include <string>
  11. #include <deque>
  12. #include <iomanip>
  13. #include <cstddef>
  14.  
  15. #define F first
  16. #define S second
  17.  
  18. using namespace std;
  19.  
  20.  
  21. const long double eps = 0.000000005;
  22. const long double pi = 3.1415926535897932;
  23. const long double inf = 1e9;
  24.  
  25.  
  26. int main()
  27. {
  28.     ios_base::sync_with_stdio(0);
  29.     //freopen("bigwall.in", "r", stdin); freopen("bigwall.out", "w", stdout);
  30.     //freopen("input.txt", "r", stdin);
  31.  
  32.     int a, b;
  33.     cin >> a >> b;
  34.  
  35.     cout << (a + b) * (b - a + 1) / 2 << endl;
  36.  
  37.     return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement