結果

問題 No.188 HAPPY DAY
ユーザー outoforderoutoforder
提出日時 2017-07-22 00:51:19
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 63 ms / 1,000 ms
コード長 723 bytes
コンパイル時間 3,398 ms
コンパイル使用メモリ 106,504 KB
実行使用メモリ 21,728 KB
最終ジャッジ日時 2023-08-29 22:38:58
合計ジャッジ時間 2,832 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
21,728 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.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace No188
{
    public class Program
    {
        public static void Main(string[] args)
        {
            DateTime n = new DateTime(2015, 1, 1);
            DateTime end = new DateTime(2015, 12, 31);
            int count = 0;

            while(n <= end )
            {
                var day = n.Day.ToString("00").ToArray().Select(s => int.Parse(s.ToString())).ToList();

                if (n.Month == day[0] + day[1])
                {
                    count++;
                }
                n = n.AddDays(1);
            }

            Console.WriteLine(count);
        }
    }
}
0