WILLITST - Will it ever stop
solution-
#include<stdio.h>
int main()
{ int k=0;
long long int n;
scanf("%lld",&n);
while(n>1)
{
if(n%2==0)
n=n/2;
else
n=n*3+3;
if(n%12==0){
k=1;
break;}}
if(k==0)
printf("TAK");
else
printf("NIE");
}
Comments
Post a Comment