using System; using System.Collections.Generic; using System.IO; using System.Linq; public class Solution { static void Main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution */ var n = Convert.ToInt32(Console.ReadLine()); var str = string.Empty; // taking input for(int i=0; i9) AddReminder(j); } } return strInt; } static void AddReminder(int i) { // if less than 9 then its fine if(strInt[i]<=9) return; else if( strInt[i]>9) { strInt[i]-=10; // setting once place by substracting strInt[i+1]+=1; // setting reminder to next position } AddReminder(i+1); } }