⌨️
[AtCoder]ABC-076|B - Addition and Multiplication
設問ページ
提出結果
def getInt():
return int(input())
def main():
n = getInt()
k = getInt()
r = 1
for i in range(n):
a = 2 * r
b = r + k
r = a if a <= b else b
print(r)
if __name__ == "__main__":
main()
Discussion