Cod sursa(job #2120578)
Utilizator | Data | 2 februarie 2018 17:35:40 | |
---|---|---|---|
Problema | Factorial | Scor | 15 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.22 kb |
#include <fstream>
using namespace std;
ifstream fin("fact.in");
ofstream fout("fact.out");
int main()
{
unsigned int x;
fin >> x;
if(!x)
fout << "1";
else
fout << (x-(x-1)/5)*5;
}