Tap here to switch tabs
Problem
Submissions

Problem: Find the Maximum Achievable Number

med
30 min
Try to solve the Find the Maximum Achievable Number problem.

Statement

You are given two integers, num and t.

An integer x is considered achievable if it can be made equal to num by applying the following operation at most t times:

  • Increase or decrease x by 11, and simultaneously increase or decrease num by 11.

Return the maximum possible value of an achievable integer x.

Constraints:

  • 1≤1 \leq num, t ≤50\leq 50

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Find the Maximum Achievable Number

med
30 min
Try to solve the Find the Maximum Achievable Number problem.

Statement

You are given two integers, num and t.

An integer x is considered achievable if it can be made equal to num by applying the following operation at most t times:

  • Increase or decrease x by 11, and simultaneously increase or decrease num by 11.

Return the maximum possible value of an achievable integer x.

Constraints:

  • 1≤1 \leq num, t ≤50\leq 50