3791. Number of Balanced Integers in a Range
You are given two integers low and high. An integer is called balanced if it satisfies both of the following conditions: - It contains at least two digits. - The sum of digits at even positions is equal to the sum of digits at odd positions (the leftmost digit has position 1). Return an integer representing the number of balanced integers in the range [low, high] (both inclusive). Example 1
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start