📅  最后修改于: 2022-03-11 14:44:51.621000             🧑  作者: Mango
#include
using namespace std;
int main()
{
unsigned int a, b;
long long int sum = 0, n;
double s1;
cin >> a >> b;
n = (b-a) + 1;
sum = n * ((double)(a+b) / 2);
cout << sum << endl;
return 0;
}