Untitled
unknown
plain_text
17 days ago
231 B
2
Indexable
Never
#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