結果

問題 No.188 HAPPY DAY
ユーザー velfare_nagatavelfare_nagata
提出日時 2016-10-03 20:37:10
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 48 ms / 1,000 ms
コード長 533 bytes
コンパイル時間 1,949 ms
コンパイル使用メモリ 98,860 KB
実行使用メモリ 22,436 KB
最終ジャッジ日時 2023-08-29 22:20:31
合計ジャッジ時間 2,516 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
22,436 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Diagnostics;
using System.Drawing.Printing;

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 );
		}
	}
}
0