Cod sursa(job #1159235)

Utilizator hopingsteamMatraguna Mihai-Alexandru hopingsteam Data 29 martie 2014 14:00:18
Problema Factorial Scor 5
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.38 kb
#include    <iostream>
#include    <fstream>

using namespace std;

ifstream fin("fact.in");
ofstream fout("fact.out");

int p, i, n;

void read()
{
    fin >> p;
}

int main()
{
    read();
    i = 1;
    while(1)
    {
        i += 1;
        if(i % 5 == 0)
            n += 1;
        if(n == p)
            break;
    }
    fout << i;
    return 0;
}