Cod sursa(job #1053409)
Utilizator | Data | 12 decembrie 2013 19:00:09 | |
---|---|---|---|
Problema | Cifra | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.27 kb |
#include <fstream>
#include <math.h>
using namespace std;
unsigned long N,S,j;
int main()
{
ifstream i("cifra.in");
ofstream o("cifra.out");
i>>N;
i.close();
for (j=1;j<=N;j++)
S=S+pow(j,j);
o<<S;
o.close();
return 0;
}