結果
| 問題 | No.632 穴埋め門松列 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-01-20 00:15:27 | 
| 言語 | C#(csc) (csc 3.9.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 27 ms / 1,000 ms | 
| コード長 | 1,341 bytes | 
| コンパイル時間 | 869 ms | 
| コンパイル使用メモリ | 104,576 KB | 
| 実行使用メモリ | 18,688 KB | 
| 最終ジャッジ日時 | 2024-12-24 12:54:09 | 
| 合計ジャッジ時間 | 1,646 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 6 | 
コンパイルメッセージ
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;
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], "1", 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.ReadLine();
        }
    }
}
            
            
            
        