Cod sursa(job #1047578)
| Utilizator | Data | 4 decembrie 2013 18:31:05 | |
|---|---|---|---|
| Problema | Cifra | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.3 kb |
#include <iostream>
#include <fstream>
#include <cmath>
using namespace std;
ifstream f("cifra.in");
ofstream g("cifra.out");
int main()
{
int t,s=0,j;
f >>t;
for(int i=1;i<=t;++i){
f >>j;
s+=pow(j,j);
g <<s%10<<"\n";
}
return 0;
}
