Untitled

mail@pastecode.io avatar
unknown
plain_text
16 days ago
233 B
2
Indexable
Never
#include <iostream>
using namespace std;

int main() {
    unsigned long long a, b;
    cin >> a >> b;
    
    unsigned long long n = b - a + 1;

    unsigned long long tong = (a + b) * n / 2;
    
    cout << tong;
    return 0;
}
Leave a Comment