Cod sursa(job #953579)

Utilizator dragoscri_cjCrisan Dragos dragoscri_cj Data 26 mai 2013 17:36:14
Problema Patrate2 Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.31 kb
#include<iostream>
#include<fstream>
int pow(int x, int y)
{
	long long rez=x,i;
	for(i=2;i<=y;i++)
		rez=rez*x;
	return rez;
}
using namespace std;
int n;
int main()
{
	ifstream f("patrate2.in");
	ofstream g("patrate2.out");
	f>>n;
	g<<n*pow(2,n)*pow(2,n*(n-1));
	f.close();
	g.close();
	return 0;
}