Cod sursa(job #51414)

Utilizator Omega91Nicodei Eduard Omega91 Data 12 aprilie 2007 11:44:09
Problema Patrate2 Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.36 kb
#include <fstream>
using namespace std;
ifstream f1("patrat2.in");
ofstream f2("patrate2.out");

unsigned long long fact(int x)
{
    unsigned long long aux;
    int i;
    aux=1;
    for (i=2; i<=x; i++)
        aux*=i;
    return aux;
}

int main()
{
    f1>>n;
    f2<<(n*n-n)*(n*n-n)*fact(n)*n*n;
    f1.close();
    f2.close();
    return 0;
}