Untitled

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