結果
問題 |
No.188 HAPPY DAY
|
ユーザー |
![]() |
提出日時 | 2016-10-03 20:37:52 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 23 ms / 1,000 ms |
コード長 | 501 bytes |
コンパイル時間 | 1,146 ms |
コンパイル使用メモリ | 108,184 KB |
実行使用メモリ | 23,960 KB |
最終ジャッジ日時 | 2024-12-31 01:06:59 |
合計ジャッジ時間 | 1,347 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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 ); } } }