Cod sursa(job #1053414)
| Utilizator | Data | 12 decembrie 2013 19:02:11 | |
|---|---|---|---|
| Problema | Cifra | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.28 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);
S=S%10;
o<<S;
o.close();
return 0;
}
