Rust easy solution
\n\nimpl Solution {\n    pub fn add_to_array_form(num: Vec<i32>, k: i32) -> Vec<i32> {\n        let mut k = k;\n        let mut res = vec![];\n        let mut j
\n```\nimpl Solution {\n    pub fn add_to_array_form(num: Vec<i32>, k: i32) -> Vec<i32> {\n        let mut k = k;\n        let mut res = vec![];\n        let mut j = num.len();\n        let mut carry = 0;\n\n        while j > 0 || k > 0 || carry > 0 {\n            if j > 0 {\n                carry += num[j - 1];\n                j -= 1;\n            }\n\n            carry += k % 10;\n            k /= 10;\n\n            res.push(carry % 10);\n            carry /= 10;\n        }\n\n        res.reverse();\n        res\n    }\n}\n```
['Rust']