Mai intai trebuie sa te autentifici.
Cod sursa(job #140399)
Utilizator | Data | 21 februarie 2008 20:35:33 | |
---|---|---|---|
Problema | Cifra | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.28 kb |
#include<stdio.h>
#include<math.h>
int main () {
double s,t,n,c;
freopen("cifra.in","r",stdin);
freopen("cifra.out","w",stdout);
scanf("%d",&t);
s=0;
for (n=1;n<=t;n++)
{
scanf("%d",&n);
s=s+pow(n,n);
c=s%10;
printf("%d",c);
}
return 0;
}