Cod sursa(job #1505268)

Utilizator LeVladzCiuperceanu Vlad LeVladz Data 18 octombrie 2015 22:32:14
Problema Patrate2 Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.33 kb
#include <fstream>
using namespace std;
ifstream fin("patrate2.in");
ofstream fout("patrate2.out");
long long n,x,nr1,nr5,y;
int main()
{
    fin>>n;
    if(n==1)
    {
        fout<<2;
    }
    else
    {
        nr5=n*2;
        nr1=(n*n-n)*2;
        x=nr5*nr1;
        y=x*n;
        fout<<y;
    }
    return 0;
}