結果

問題 No.779 Heisei
ユーザー hayashi
提出日時 2019-10-17 11:53:02
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 26 ms / 1,000 ms
コード長 1,058 bytes
コンパイル時間 1,038 ms
コンパイル使用メモリ 109,484 KB
実行使用メモリ 21,816 KB
最終ジャッジ日時 2024-06-24 01:03:35
合計ジャッジ時間 2,936 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] N = Console.ReadLine().Split(' ');
            int Y = int.Parse(N[0]);
            int M = int.Parse(N[1]);
            int D = int.Parse(N[2]);

            if(Y == 1989)
            {
                if(M == 1 && D < 8)
                {
                    Console.WriteLine("No");
                }
                else
                {
                    Console.WriteLine("Yes");
                }
            }
            else if (Y == 2019)
            {
                if (M >= 5)
                {
                    Console.WriteLine("No");
                }
                else
                {
                    Console.WriteLine("Yes");
                }
            }
            if (Y >= 1990 && Y <= 2018)
            {
                Console.WriteLine("Yes");
            }
            if(Y > 2019 || Y < 1989)
            {
                Console.WriteLine("No");
            }
        }
    }
}
0