Cod sursa(job #1926861)

Utilizator robertro1Benedek Robert George robertro1 Data 14 martie 2017 18:56:47
Problema Factorial Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.33 kb
#include <bits/stdc++.h>

using namespace std;

int main()
{
    ifstream f("fact.in");
    ofstream g("fact.out");

    int n=0 ,p;
    f>>p;
    if(p==0)
        g<<"1";
    else
    {
        for(int i=1; i<=p; i++)
    {


            n=n+5; if(n%25==0)
            p--;
    }
    g<<n;}

    return 0;
}