結果

問題 No.188 HAPPY DAY
ユーザー pofpof
提出日時 2019-05-19 18:36:44
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 23 ms / 1,000 ms
コード長 554 bytes
コンパイル時間 766 ms
コンパイル使用メモリ 107,272 KB
実行使用メモリ 23,840 KB
最終ジャッジ日時 2024-09-17 06:31:19
合計ジャッジ時間 1,157 ms
ジャッジサーバーID
(参考情報)
judge1 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            DateTime date1 = new DateTime(2015, 1, 1);
            int cnt = 0;
            for (int i = 0; i < 365; i++)
            {
                int m = date1.Month;
                int d1 = date1.Day/10;
                int d2 = date1.Day%10;
                if (m == d1 + d2){
                    cnt++;
                }
                date1 = date1.AddDays(1);
            }
            Console.WriteLine(cnt);
        }
    }
}
0