Find the Punishment Number of an Integer
An integer `i` is a punishment number when the decimal representation of `i * i` can be partitioned into one or more contiguous substrings, in order, whose values sum to exactly `i`. The returned punishment number for `n` is the sum of `i * i` over every punishment number `i` with `1 <= i <= n`.