Sunday, May 20, 2012

UVA Solution for 100

#include
int main()
{
long int i,j,n1,n2,max=0,l,temp;

while(scanf("%ld %ld",&n1,&n2)==2){
printf("%ld",n1);
printf(" %ld",n2);
max=0;

if(n2>1;
else i=3*i+1;
l++;
}
if(l>max) max=l;

}
printf(" %ld\n",max);
}
return 0;
}