Watermelon Game
InterviewTime limit1sMemory limit1024 MB
Given N and K cherries, find how many level N watermelons can be made by merging two equal-level fruits into the next level.
- Level
Easy2 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
A level 1 fruit is a cherry, and a level fruit is a watermelon.
You can consume two level fruits to make one level fruit.
Find the maximum number of watermelons you can make from cherries.
Input
The first line contains two integers and , separated by a space.
Output
Print the maximum number of watermelons that can be made on the first line.