Cod sursa(job #2029235)

Utilizator Andrei.GheorgheAndrei Gheorghe Andrei.Gheorghe Data 29 septembrie 2017 18:43:26
Problema Factorial Scor 5
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.4 kb
#include<fstream>
#include<math.h>
#include<algorithm>
using namespace std;
int main()
{
    ifstream fin("fact.in");
    ofstream fout("fact.out");
    int n,p,sum=1,k=1,i=5;
    fin>>p;
    while(true)
    {
        if(p==0)
        {
            fout<<k;
            break;
        }
         if(i/5==p)
         {
             break;
         }else{i=i+5;}
    }
    fout<<i;
}