WILLITST  Will it ever stop
When Bob was in library in University of Warsaw he saw on one of facades caption :"Will it ever stop?" and below some mysterious code:
while n > 1 if n mod 2 = 0 then n:=n/2 else n:=3*n+3
Help him finding it out !
Input
In first line one number n<=10^14.
Output
Print "TAK" if program will stop, otherwise print "NIE"
Example
Input: 4 Output: TAK
hide comments
ayushgupta1997:
20170520 06:52:18
ac in one go! simply try to figure out from 1 to 10 using pen and no need of unsigned long long and bit manipulation,while loop will do ur job.


newbie_127:
20170517 15:45:07
AC in one go .


bharat190991:
20170427 05:49:05
if the loop is infinite then it will repeat the pattern so no need of any bit manipulation. hope it will help. 

horcrux2301:
20170403 19:50:32
HINT: If the number is a power of 2 then it will stop otherwise not. 

rohit659:
20170315 08:41:02
use unsigned long long int , long long int costed me WA 

rohit9934:
20170211 15:51:41
Bit manipulation Says that if( x&(x1))==0 then number is a power of 2,else not.Dont forget the brackets,it costs me a WA. 

bhaskar_uoh:
20170129 17:42:45
No fancy things required, just try to find out pattern for few starting numbers using pen and paper 

~~diva~~:
20161227 14:54:26
no need of bit maipulation , just check if the number is becoming 3,6 or 12 at any time within the while loop .if yes, only then it's forming an infinite loop! Last edit: 20161227 15:07:49 

deepak1228:
20161221 18:11:49
https://www.hackerearth.com/practice/notes/bitmanipulation/


apurvgs:
20161220 14:41:20
easy problem,,just if condition and bit manipulation Last edit: 20161224 13:27:44 
Added by:  Krzysztof Lewko 
Date:  20111109 
Time limit:  0.906s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  AMPPZ 2011 