Pagini recente » Cod sursa (job #2712056) | punetiosullatreaba | Monitorul de evaluare | ONIS 2016, Clasament Runda 1 | Cod sursa (job #2219056)
/* #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;
}