Cod sursa(job #2023707)

Utilizator Andrei.GheorgheAndrei Gheorghe Andrei.Gheorghe Data 19 septembrie 2017 13:28:01
Problema Cifra Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.35 kb
#include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main()
{
    int a,b,n,v[100],i,j,x,s=0,m[100];
    cin>>n;
    for(i=0;i<n;i++)
    {
        cin>>v[i];
    }
    for(j=1;j<=n;j++)
    {
        for(x=1;x<=v[j-1];x++)
        {
            s=s+pow(x,x);
        }
        cout<<s%10;
        s=0;
    }
}