Cod sursa(job #664375)
Utilizator | Data | 20 ianuarie 2012 00:05:36 | |
---|---|---|---|
Problema | Cifra | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.19 kb |
#include<iostream>
#include<fstream>
using namespace std;
int main()
{int i,n,y=1,s=0,z,p;
cin>>n;
while(y<=n)
{z=y;p=1;
while(z!=0)
{p=p*y;
z--;}
s=s+p;
y++;}
cout<<s%10;
return 0;}