Cod sursa(job #667765)

Utilizator hcalinHrih Calin hcalin Data 23 ianuarie 2012 18:47:46
Problema Factorial Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.21 kb
#include <fstream>
using namespace std;

ifstream f("fact.in");
ofstream g("fact.out");

int p,n,x,y;

int main(){
	f>>p;
	y=p;
	y=y/6;
	y=y*5;
	n=p*5-y;
	if(p==0)
		n=1;
	g<<n;
	return 0;
}