結果
| 問題 | No.188 HAPPY DAY | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2017-08-14 22:16:30 | 
| 言語 | C#(csc) (csc 3.9.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 24 ms / 1,000 ms | 
| コード長 | 1,033 bytes | 
| コンパイル時間 | 5,492 ms | 
| コンパイル使用メモリ | 113,028 KB | 
| 実行使用メモリ | 23,236 KB | 
| 最終ジャッジ日時 | 2024-12-31 05:49:10 | 
| 合計ジャッジ時間 | 2,338 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 1 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleApp17
{
    class Program
    {
        static void Main(string[] args)
        {
            int happyday = 0;
            int dd = 0;
            for (int m=1;m<=12;++m)
            {
                for (int d=1;d<=31;++d)
                {
                    if (m == 2 && 29 <= d)
                    {
                        break;
                    }
                    if ((m == 4 || m == 6 || m == 9 || m == 11) && 31 == d)
                    {
                        break;
                    }
                    if ( 0 <= d && d <=  9) dd = d;
                    if (10 <= d && d <= 19) dd = d - 10 + 1;
                    if (20 <= d && d <= 29) dd = d - 20 + 2;
                    if (30 <= d && d <= 31) dd = d - 30 + 3;
                    if (m == dd) happyday += 1;
                }
                dd = 0;
            }
            Console.WriteLine(happyday);
            Console.ReadLine();
        }
    }
}
            
            
            
        