Cod sursa(job #2108915)
| Utilizator | Data | 18 ianuarie 2018 22:21:57 | |
|---|---|---|---|
| Problema | Factorial | Scor | 15 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.31 kb |
#include <iostream>
#include <vector>
#include <fstream>
#include <math.h>
using namespace std;
ifstream fin("fact.in");
ofstream fout("fact.out");
int main(){
unsigned long long int p, val,fact = 1,it = 1;
fin >> p;
it = (p - (p - 1) / 5) * 5;
fout << it;
return 0;
}