Codechef•May 15, 2025
Watching Movies at 2x
Hazrat Ali
Codechef
Chef has decided to watch the first YY minutes of the movie at twice the usual speed as he was warned by his friends that the movie gets interesting only after the first YY minutes.
How long will Chef spend watching the movie in total?
Note: It is guaranteed that YY is even.
Input Format
- The first line contains two space separated integers X,YX,Y - as per the problem statement.
Output Format
- Print in a single line, an integer denoting the total number of minutes that Chef spends in watching the movie.
Constraints
- 1≤X,Y≤1000
- YY is an even integer.
Subtasks
Subtask #1 (100 points): original constraints
Sample 1:
Input
100 20
Output
90
Solution
m,n=map(int, input().split())
print((m-n)+ n//2)