Cod sursa(job #2987646)
| Utilizator | Data | 2 martie 2023 17:35:59 | |
|---|---|---|---|
| Problema | Factorial | Scor | 0 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.32 kb |
#include <fstream>
using namespace std;
ifstream in ("fact.in");
ofstream out ("fact.out");
int main()
{
long long p,q,cnt=0,i;
in>>p;
for(i=0;i<=10000000;i++)
{
cnt+=i/5;
if(cnt>=p)
{
out<<i*5;
return 0;
}
}
return 0;
}
