blob: 05900e3f39601d185abcc649124c018e0d210903 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
f = open('3.in', 'r')
o = open('3.out', 'w')
t = int(f.readline().strip())
for i in range(t):
(n, k) = map(int, f.readline().strip().split(' '))
res = 'ON' if k & 2**n-1 == 2**n-1 else 'OFF'
s = "Case #%d: %s\n" % (i+1, res)
o.write(s)
|