Cod sursa(job #1191688)

Utilizator mihai17militaru mihai mihai17 Data 28 mai 2014 14:16:55
Problema Cifra Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.29 kb
#include <iostream>
#include <fstream>
#include <cmath>
using namespace std;
ifstream f("cifra.in");
ofstream g("cifra.out");

int main()
{  int n,t,i,s=0;
    f>>n>>t;
    for(i=1;i<=n;i++)
    {t=t%10;
     s+=pow(t,t);
     s%=10;g<<s<<'\n';
     f>>t;}

    return 0;
}