結果

問題 No.188 HAPPY DAY
ユーザー 明智重蔵明智重蔵
提出日時 2015-09-12 11:20:01
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 607 bytes
コンパイル時間 3,286 ms
コンパイル使用メモリ 99,664 KB
実行使用メモリ 20,892 KB
最終ジャッジ日時 2023-08-29 03:05:22
合計ジャッジ時間 3,788 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

using System;

class Program
{
    static void Main()
    {
        int Answer = 0;

        DateTime CurrDay = new DateTime(2015, 1, 1);
        for (; CurrDay.Year == 2015; CurrDay = CurrDay.AddDays(1)) {
            if (IsHappyDay(CurrDay)) {
                Console.WriteLine("{0}はHappy Day", CurrDay.ToString(@"yyyy\/MM\/dd"));
                Answer++;
            }
        }
        Console.WriteLine(Answer);
    }

    static bool IsHappyDay(DateTime pTarget)
    {
        int wkMonth = pTarget.Month;
        int wkDay = pTarget.Day;
        return wkMonth == wkDay / 10 + wkDay % 10;
    }
}
0