Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
211 B
0
Indexable
Never
#include <iostream>
#include <cmath>
using namespace std;
int main() {
	int a, b, c, d;
	cin >> a >> b;
	c = 0;
	d = 0;
	for (int i = 1; i < a + 1; i++) {
		c = i;
		d += pow(i, b);
	}
	cout << d;
}