Cod sursa(job #869606)
Utilizator | Data | 1 februarie 2013 20:42:43 | |
---|---|---|---|
Problema | Factorial | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.31 kb |
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream fin("fact.in");
ofstream fout("fact.out");
int n,x=0,z=1,m=1;
fin>>n;
x=n/6;
if(n>0)
{
m=(n-x)*5;
}
fout<<m;
fin.close();
fout.close();
return 0;
}