Tap here to switch tabs
Problem
Submissions

Problem: Keep Multiplying Found Values by Two

med
30 min
Try to solve the Keep Multiplying Found Values by Two problem.

Statement

You are given an array of integers nums and an integer original.

Search for original in nums. If the value is found, multiply original by 22 and repeat the search process. Continue this operation as long as the current value of original is present in nums.

Return the resulting value of original once it is no longer found in nums.

Constraints:

  • 1≤1 \leq nums.length ≤1000\leq 1000

  • 1≤1 \leq nums[i], original ≤1000\leq 1000

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Keep Multiplying Found Values by Two

med
30 min
Try to solve the Keep Multiplying Found Values by Two problem.

Statement

You are given an array of integers nums and an integer original.

Search for original in nums. If the value is found, multiply original by 22 and repeat the search process. Continue this operation as long as the current value of original is present in nums.

Return the resulting value of original once it is no longer found in nums.

Constraints:

  • 1≤1 \leq nums.length ≤1000\leq 1000

  • 1≤1 \leq nums[i], original ≤1000\leq 1000