Cod sursa(job #908042)
Utilizator | Data | 8 martie 2013 17:44:01 | |
---|---|---|---|
Problema | Cifra | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.46 kb |
#include <iostream>
#include <fstream>
using namespace std;
int f,g,a,x,s,i,j,y,b;
int main()
{
ifstream f("data.in");
ofstream g("data.out");
f>>a;
x=1;
for(i=1;i<=a;i++)
{
f>>b;
for(j=1;j<=b;j++)
{
for(y=1;y<=j;y++)
{
x=x*j;
}
s=s+x;
x=1;
}
g<<s%10<<endl;
s=0;
}
return 0;
}