[LeetCode] Smallest Divisible Digit Product II

3348. Smallest Divisible Digit Product II

You are given a string num which represents a positive integer, and an integer t.

A number is called zero-free if none of its digits are 0.

Return a string representing the smallest zero-free number greater than or equal to num such that the product of its digits is divisible by t. If no such number exists, return "-1".

Read more
[LeetCode] Maximum Frequency of an Element After Performing Operations II

3347. Maximum Frequency of an Element After Performing Operations II

You are given an integer array nums and two integers k and numOperations.

You must perform an operation numOperations times on nums, where in each operation you:

  • Select an index i that was not selected in any previous operations.
  • Add an integer in the range [-k, k] to nums[i].

Return the maximum possible frequency of any element in nums after performing the operations.

The frequency of an element x is the number of times it occurs in the array.

Read more
[LeetCode] Maximum Frequency of an Element After Performing Operations I

3346. Maximum Frequency of an Element After Performing Operations I

You are given an integer array nums and two integers k and numOperations.

You must perform an operation numOperations times on nums, where in each operation you:

  • Select an index i that was not selected in any previous operations.
  • Add an integer in the range [-k, k] to nums[i].

Return the maximum possible frequency of any element in nums after performing the operations.

The frequency of an element x is the number of times it occurs in the array.

Read more
[LeetCode] Smallest Divisible Digit Product I

3345. Smallest Divisible Digit Product I

You are given two integers n and t. Return the smallest number greater than or equal to n such that the product of its digits is divisible by t.

Read more
[AtCoder] F - Gather CoinsRead more
[AtCoder] G - Add and Multiply QueriesRead more
[AtCoder] F - Maximum CompositionRead more
[AtCoder] B - Annoying String ProblemRead more
[AtCoder] C - Row and Column OrderRead more
[AtCoder] F - Range Connect MSTRead more