C#
\npublic IList<int> AddToArrayForm(int[] A, int K) {\n    var i = A.Length - 1;\n    var result = new List<int>();\n    while(i >= 0 || K > 0) {\n        K += (
```\npublic IList<int> AddToArrayForm(int[] A, int K) {\n    var i = A.Length - 1;\n    var result = new List<int>();\n    while(i >= 0 || K > 0) {\n        K += (i >= 0 ? A[i--] : 0);\n        result.Add((K % 10));\n        K /= 10;\n    }\n    result.Reverse();\n    return result;\n}\n```
[]