Cod sursa(job #23699)
Utilizator | Data | 1 martie 2007 10:52:10 | |
---|---|---|---|
Problema | Cifra | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.23 kb |
#include <fstream.h>
#include <math.h>
int main()
{
int T,i; long s=0;
ifstream f("cifra.in");
ofstream g("cifra.out");
f>>T; f.close();
for (i=1;i<=T;i++)
{
s = s+pow(i,i);
g << s%10 << '\n';
}
}