Cod sursa(job #518508)

Utilizator Antonius74Antonius Cezar Hegyes Antonius74 Data 1 ianuarie 2011 16:02:27
Problema Factorial Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.26 kb
#include <cstdio>
using namespace std;
int main()
{
	freopen("factorial.in","r",stdin);
	freopen("factorial.out","w",stdout);
	
	int p,x,y=5,t=0;
	scanf ("%d",&p);
	
	x=5*p;
	while (y>x)
	{
		y+=6;
		t++;
	}
	t--;
	t*=5;
	x-=t;
	
	printf ("%d",x);
}