//http://www.spoj.com/problems/WILLITST/
#include<stdio.h>
#include"string.h"
int main()
{
long long int x;
scanf("%lld",&x);
if(((x != 0) && ((x & (~x + 1)) == x))) //checks for 2^n
printf("TAK\n");
else
printf("NIE\n");
return 0;
}
#include<stdio.h>
#include"string.h"
int main()
{
long long int x;
scanf("%lld",&x);
if(((x != 0) && ((x & (~x + 1)) == x))) //checks for 2^n
printf("TAK\n");
else
printf("NIE\n");
return 0;
}
No comments:
Post a Comment