Cod sursa(job #490402)

Utilizator thekrisserzaharia cristian thekrisser Data 6 octombrie 2010 15:26:45
Problema Factorial Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.17 kb


#include <stdio.h>
int func()
{
	int i,pas=2<<16;
	for (i=0;pas!=0;pas>>=1)
		if ((i+pas=n)&&(v[i+pas]<=x)) i+=pas;
	if (v[i]!=x)
		return -1;
	else return i;
}