結果

問題 No.188 HAPPY DAY
ユーザー pofpof
提出日時 2019-05-19 18:36:44
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 22 ms / 1,000 ms
コード長 554 bytes
コンパイル時間 821 ms
コンパイル使用メモリ 105,860 KB
実行使用メモリ 23,816 KB
最終ジャッジ日時 2023-10-17 07:58:00
合計ジャッジ時間 1,159 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
23,816 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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