Easy
,Math
,Array
989. Add to Array-Form of Integer
The array-form of an integer num
is an array representing its digits in left to right order.
num = 1321
, the array form is [1,3,2,1]
.Given num
, the array-form of an integer, and an integer k
, return the array-form of the integer num + k
.
Example 1:
Example 2:
Example 3:
Constraints:
num.length
<= 104num[i]
<= 9num
does not contain any leading zeros except for the zero itself.k
<= 104Ron ChenWed, Feb 15, 2023
用原始方法做一遍
MarsgoatWed, Feb 15, 2023