Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
207 B
0
Indexable
Never
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
	int n,f = 0;
	double g = 0;
	cin >> n ;
	for (int i = 1; i < n+1; i++)
	{
		g += pow(i, n-f);
		f += 1;
	}
	cout << g;
}