Cod sursa(job #1505249)
Utilizator | Data | 18 octombrie 2015 22:10:14 | |
---|---|---|---|
Problema | Patrate2 | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.37 kb |
#include <fstream>
using namespace std;
ifstream fin("patrate2.in");
ofstream fout("patrate2.out");
long long n,x,p,y;
int main()
{
fin>>n;
if(n==1)
{
fout<<2;
}
else
{
x=n*n;p=1;
while(x!=0)
{
p=p*2;
x--;
}
y=p*n;
fout<<y;
}
return 0;
}