結果

問題 No.632 穴埋め門松列
ユーザー poritporit
提出日時 2018-01-19 23:40:02
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,339 bytes
コンパイル時間 2,046 ms
コンパイル使用メモリ 101,824 KB
実行使用メモリ 23,552 KB
最終ジャッジ日時 2023-08-26 00:34:42
合計ジャッジ時間 3,127 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Program
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] list = Console.ReadLine().Split();
            string output = null;

            //?=1の場合
            for (int i = 0; i < 3; ++i)
            {
                if (String.Compare(list[i],"?",true) == 0)
                {
                    list[i] = "1";
                }
            }

            int x1 = int.Parse(list[0]);
            int x2 = int.Parse(list[1]);
            int x3 = int.Parse(list[2]);

            if ((x2 > x1 && x2 > x3) || (x2 < x1 && x2 < x3))
            {
                output =  "1";
            }


            //?=4の場合
            for (int i = 0; i < 3; ++i)
            {
                if (String.Compare(list[i], "?", true) == 0)
                {
                    list[i] = "4";
                }
            }

            int x4 = int.Parse(list[0]);
            int x5 = int.Parse(list[1]);
            int x6 = int.Parse(list[2]);

            if ((x5 > x4 && x5 > x6) || (x5 < x4 && x5 < x6))
            {
                output = "4";
            }


            Console.WriteLine(output);
            Console.WriteLine();
        }
    }
}
0