From 6c5753fa1a8cdfd8595545dccef8ceceea8e95f4 Mon Sep 17 00:00:00 2001 From: divyalakhwani31 <34311805+divyalakhwani31@users.noreply.github.com> Date: Mon, 28 Oct 2019 20:24:12 +0530 Subject: [PATCH] Add files via upload --- python/willist.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 python/willist.py diff --git a/python/willist.py b/python/willist.py new file mode 100644 index 0000000..8e5fc1b --- /dev/null +++ b/python/willist.py @@ -0,0 +1,15 @@ +# your code goes here +n = int(input()) + +if(n == 1): + print("TAK") + +else: + while(n % 2 == 0 and n > 0): + n /= 2 + if( n == 1 ): + print("TAK") + break + + if(n > 1): + print("NIE")