Cod sursa(job #2190150)

Utilizator VladP02Popescu Vlad VladP02 Data 29 martie 2018 21:15:29
Problema Factorial Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.29 kb
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("fact.in");
ofstream g("fact.out");


int p,k,scadere;
int main()
{
    f>>p;
    if(p==0) {g<<1;return 0;}
    while(p)
    {k=k+5;p--;}
    if(k>=25) k=k-(((k/25)*5)/2);
    g<<k;
    cout<<k;
    return 0;
}