You are viewing a single comment's thread. Return to all comments →
def cipher(k, s): # Write your code here if(k==0): return s S=s[0] for i in range(1,len(s)-(k-1)): S+=str(int(s[i])^int(s[i-1])^(0 if i<k else int(S[i-k]))) return S
Seems like cookies are disabled on this browser, please enable them to open this website
Cipher
You are viewing a single comment's thread. Return to all comments →