using System; using System.Diagnostics; namespace CodeIq { internal class Program { private static void Main() { var happyDayCount = 0; var date = new DateTime( 2015, 1, 1 ); for( var i = 1; i <= 365; i++ ) { var x = date.Month; var y = date.Day; Debug.Print( "{0}/{1}", x, y ); if( x == ( ( y / 10 ) + ( y % 10 ) ) ) happyDayCount++; date = date.AddDays( 1 ); } Debug.Print( happyDayCount.ToString() ); Console.WriteLine( happyDayCount ); } } }