結果

問題 No.138 化石のバージョン
ユーザー mrc1031
提出日時 2016-10-11 16:31:32
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 565 bytes
コンパイル時間 1,159 ms
コンパイル使用メモリ 105,984 KB
実行使用メモリ 19,072 KB
最終ジャッジ日時 2024-11-22 01:29:36
合計ジャッジ時間 3,329 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19 WA * 14
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Linq;

class Program
{
    static void Main(string[] args)
    {
        // No.138 化石のバージョン

        int[] kasekiVer = Console.ReadLine().Split('.').Select(s => int.Parse(s)).ToArray();
        int[] hanteiVer = Console.ReadLine().Split('.').Select(s => int.Parse(s)).ToArray();
        bool isKaseki = true;

        for (int i = 0; i < kasekiVer.Length; i++)
        {
            if (kasekiVer[i] < hanteiVer[i])
                isKaseki = false;
        }

        Console.WriteLine(isKaseki ? "YES" : "NO");

    }
}
0