Created
February 3, 2012 12:32
-
-
Save erkobridee/1729957 to your computer and use it in GitHub Desktop.
um dos desafios do site rankk.org
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def binaryStringCalc(strValue): | |
result = 0 | |
for v in strValue.split(' + '): | |
result += int(v,2) | |
return str(bin(result)).split('0b')[1] | |
print binaryStringCalc('110000001 + 100111001 + 100101000 + 10000011 + 111010001') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment