Cod sursa(job #2219056)
| Utilizator | Data | 7 iulie 2018 00:24:17 | |
|---|---|---|---|
| Problema | Cifra | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.55 kb |
/* #include <fstream>
#include <iostream>
using namespace std;
ifstream fin("triunghi.in");
ofstream fout("triunghi.out");
int N , S , i , j , x[18][18];
int main(
{
fin >> N>> S;
return 0;
}
*/
#include <fstream>
#include <iostream>
#include<math.h>
using namespace std;
ifstream fin("cifra.in");
ofstream fout("cifra.out");
int n,i,x,j;
int main(
{
fin >> n;
for (i=1;i<=n;++i){
for (j=1;j<=i;++j) x+=pow(j,j);
fout << x%10 << endl;
}
return 0;
}
