You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
t=int(input())
for i in range(t):
n=int(input())
count=0
mac=0
arr=[]
for i in range(1,n+1):
arr.append(i)
if n==1:
print(1)
else:
for i in range(len(arr)):
if (arr[i] & arr[i+1])>0:
count=arr[i] & arr[i+1]
mac=max(mac,count)
print(mac)
The text was updated successfully, but these errors were encountered:
@ritikagarg0326 first you have to assign this to me. Only then i can generate pr.Take help from youtube to see how to assign this to me.
Please do assign it to me.
t=int(input())
for i in range(t):
n=int(input())
count=0
mac=0
arr=[]
for i in range(1,n+1):
arr.append(i)
if n==1:
print(1)
else:
for i in range(len(arr)):
if (arr[i] & arr[i+1])>0:
count=arr[i] & arr[i+1]
mac=max(mac,count)
print(mac)
The text was updated successfully, but these errors were encountered: