Xor and Sum Discussions | Algorithms | HackerRank
  • + 4 comments

    my python 3 pretty simple approach and passes all test case:

    a=input()
    b=input()
    x=int(a,2)
    y=int(b,2)
    p=0
    for i in range(0,314160):
        p+=x^(y<<i)
    print(p%((10**9)+7))