I have been trying to solve INTER for a few hours now and I am just unable to do it within the time limit.
Since I am new to python I have most likely made several stupid misstakes, but I am unable to spot them.
My code looks like this:
import psyco;psyco.full()
def B(n):
b = ''
while n > 0:
j=n&1;b=str(j)+b;n>>=1
return b
def A(s):
o=''
for p in range(len(s)):
o+=str(int(s[p])^1)
return o
def M(s):
ts=int(A(s[32:48]),2);ln=48+ts
print A(B(int(A(s[48:ln]),2)%int(A(s[:32]),2)))
return s[ln:]
q=raw_input()
while 1:
q=M(q)
if(not len(q)):
break
I believe the problem might be my output, but I am not really sure how to output in a faster fashion.
Any help would be appreciated.