Magic While

Task

Write a program to calculate and output items' count on the last day

Sample Input

  • 3 2

Sample Output

  • 12

Explanation

  • Day 1: 6 (32)

  • Day 2: 12 (62)

items = int(input())
days = int(input())

while days > 0:
    items *= 2
    days -= 1
print(items)

Last updated