View Code of Problem 3700

#include<stdio.h>
#include<string.h>
#include<math.h>
#include<stdlib.h> 
int main()
{
	int tc;
	while(scanf("%d",&tc)!=EOF&&tc!=0)
	 {	int k=0;
	 	int num;
	 	while(tc%2!=1)
	 	{
	 		tc=tc/2;
	 		k++;
		 }
		 num=(int)pow(2,k);
		 printf("%d\n",num);
	 }
	return 0;
}

Double click to view unformatted code.


Back to problem 3700