Created
November 26, 2014 09:18
-
-
Save avamsi/2f1601f1b1adc65664c5 to your computer and use it in GitHub Desktop.
This file contains 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
from math import log | |
try: | |
while True: | |
a, b = map(int, raw_input().split('e')) | |
n = a * 10**b | |
p = 1 << int(log(n, 2)) | |
ans = 1 + 2*(n - p) | |
print ans | |
except ValueError: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment