Skip to content

Commit

Permalink
add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
zehengl committed Apr 2, 2024
1 parent a017148 commit 7ec2a34
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/snappereasy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
t = int(input())
for i in range(t):
n, k = [int(d) for d in input().split()]
on = True
for _ in range(n):
if not k % 2:
on = False
k //= 2
print(f'Case #{i+1}: {"ON" if on else "OFF"}')
9 changes: 9 additions & 0 deletions src/snapperhard.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
t = int(input())
for i in range(t):
n, k = [int(d) for d in input().split()]
on = True
for _ in range(n):
if not k % 2:
on = False
k //= 2
print(f'Case #{i+1}: {"ON" if on else "OFF"}')

0 comments on commit 7ec2a34

Please sign in to comment.