Untitled

mail@pastecode.io avatar
unknown
plain_text
5 months ago
231 B
2
Indexable
#include <iostream>
using namespace std;

int main() {
    unsigned long long n, k;
    cin >> n >> k;

    unsigned long long m = n / k;

    unsigned long long S = k * m * (m + 1) / 2;

    cout << S << endl;
    
    return 0;
}
Leave a Comment