結果

問題 No.188 HAPPY DAY
ユーザー ProgramingWeProgramingWe
提出日時 2017-10-27 14:57:19
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 48 ms / 1,000 ms
コード長 2,064 bytes
コンパイル時間 2,120 ms
コンパイル使用メモリ 103,216 KB
実行使用メモリ 20,428 KB
最終ジャッジ日時 2023-08-30 01:30:46
合計ジャッジ時間 2,548 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
20,428 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.Text;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            int HAPPY_DAY = 0;
            int[] month31 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 3, 4 };
            int[] month30 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 3 };
            int[] month28 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
            foreach (int month in month31)
            {
                if (month == 1)
                {
                    HAPPY_DAY++;
                }
                if (month == 3)
                {
                    HAPPY_DAY++;
                }
                if (month == 5)
                {
                    HAPPY_DAY++;
                }
                if (month == 7)
                {
                    HAPPY_DAY++;
                }
                if (month == 8)
                {
                    HAPPY_DAY++;
                }
                if (month == 10)
                {
                    HAPPY_DAY++;
                }
                if (month == 12)
                {
                    HAPPY_DAY++;
                }
            }
            foreach (int month in month30)
            {
                if (month == 4)
                {
                    HAPPY_DAY++;
                }
                if (month == 6)
                {
                    HAPPY_DAY++;
                }
                if (month == 9)
                {
                    HAPPY_DAY++;
                }
                if (month == 11)
                {
                    HAPPY_DAY++;
                }
            }
            foreach (int month in month28)
            {
                if (month == 2)
                {
                    HAPPY_DAY++;
                }
            }
            Console.WriteLine(HAPPY_DAY);
        }
    }
}
0