Cod sursa(job #666954)
Utilizator | Data | 22 ianuarie 2012 14:44:38 | |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.22 kb |
#include <fstream>
using namespace std;
ifstream f("factorial.in");
ofstream g("factorial.out");
int p,n,x,y;
int main(){
f>>p;
y=p;
while(y){
y/=6;
if(y!=0)
x+=1;
}
x=x*5;
n=p*5-x;
g<<n;
}