We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
// Complete the beautifulDays function below.staticintbeautifulDays(inti,intj,intk){intdays=0;for(intstart=i;start<=j;start++){char[]reverse=start.ToString().ToCharArray();Array.Reverse(reverse);intrev=Convert.ToInt32(newstring(reverse));if((Math.Abs(start-rev)%k)==0){days+=1;}}returndays;}
Beautiful Days at the Movies
You are viewing a single comment's thread. Return to all comments →
Timing out for 3 TC, any suggestions please?