Untitled
Anonymous
plain_text
11/16/2022 10:53 AM
284 B
21
Indexable
#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;
}Editor is loading...