Skip to content

Commit

Permalink
Merge pull request #2 from divyalakhwani31/willist-python
Browse files Browse the repository at this point in the history
python solution
  • Loading branch information
divyalakhwani31 authored Oct 28, 2019
2 parents 8b2e92e + 6c5753f commit c0ef40f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions python/willist.py
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit c0ef40f

Please sign in to comment.