spoj problem will it ever stop(WILLITST)

WILLITST

#include<iostream>
using namespace std;
int main()
{
long long N;
while(scanf("%lld",&N)!=EOF)
{if((N&(N-1))==0)// check whether it is a power of 2
printf("TAK\n");
else
printf("NIE\n");
}
return(0);
}


No comments:

Post a Comment