Skillrack - Daily answers
Home
Daily challenge
Daily Challenge - Integers Sum Flip Kth bit ProgramID - 13639
Daily Challenge - Integers Sum Flip Kth bit ProgramID - 13639
Helper
July 25, 2021
n=int(input())
l=list(map(int,input().split()))
k=int(input())
s=0
for i in range(n):
b=bin(l[i])[2:]
print(len(b))
if(len(b)<k):
s+=l[i]
else:
s+=l[i]^(1<<k-1)
print(s)
Daily challenge
Facebook
Twitter
Post a Comment
1 Comments
Unknown
25 July 2021 at 23:25
Program didn't run
Reply
Delete
Replies
Reply
Add comment
Load more...
Why this website?
Subscribe to get daily notifications once answers are uploaded. Get Answers here at, 1. Daily Challenges. @12pm 2. Evening 6pm - 9pm MCQ answers. @7pm
Categories
6-9pm Test answers
26
Daily challenge
19
Search This Blog
1 Comments
Program didn't run
ReplyDelete