Cod sursă (job #215451)

Utilizator avatar JustJordas Iordache Razvan JustJordas IP ascuns
Problemă 2sah (clasele 11-12) Compilator cpp | 0,29 kb
Rundă Arhiva de probleme Status evaluat
Dată 5 mar. 2016 12:28:56 Scor 3
#include <fstream>


using namespace std;

int main()
{
    int i,j,k,n,t,p=1;
    ifstream x ("2sah.in");
    ofstream y ("2sah.out");
    x>>t;
    x>>n>>k;
    if(t==1)
    {
        while(k-1!=0)
        {
            p=p*3;
            k--;
        }
    }
    y<<p;
}