2843. Count Symmetric Integers
You are given two positive integers
low
andhigh
.An integer
x
consisting of2 * n
digits is symmetric if the sum of the firstn
digits ofx
is equal to the sum of the lastn
digits ofx
. Numbers with an odd number of digits are never symmetric.Return the number of symmetric integers in the range
[low, high]
.
c++
1 | class Solution { |