Cod sursă (job #195728)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | 2sah (clasele 11-12) | Compilator | cpp | 0,24 kb |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 8 feb. 2016 15:40:58 | Scor | 3 |
#include <iostream>
#include <fstream>
using namespace std;
int main()
{int p,n,k,s=1,i;
ifstream f("2sah.in");
ofstream g("2sah.out");
f>>p>>n>>k;
if (p==1)
{for (i=1;i<k;i++)
{s=s*3;}
g<<s;}
f.close();
g.close();
return 0;
}