Created
October 25, 2016 18:44
-
-
Save mikl745/94d15948a3f138781ffbde62cef13b45 to your computer and use it in GitHub Desktop.
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
# n, k = | |
n = int(input()) | |
k = int(input()) | |
# n = map(int,input(). split()) | |
# k = map(int,input(). split()) | |
# l = k - 2 | |
# i = n - 1 | |
# s = pow(n, l) | |
# x = pow(i, 2) | |
# print(x * s) | |
if n < k: | |
print(2 * n - 1) | |
elif n > k: | |
print(2 * k - 1) | |
elif n == k: | |
print(2 * k - 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment