Untitled
#include <iostream> #include <cmath> using namespace std; int main() { unsigned long long a, b; cin >> a >> b; long long ssh = (b - a)/1+1; unsigned long long tong = (a + b)*ssh/2; cout << tong ;
Leave a Comment
#include <iostream> #include <cmath> using namespace std; int main() { unsigned long long a, b; cin >> a >> b; long long ssh = (b - a)/1+1; unsigned long long tong = (a + b)*ssh/2; cout << tong ;