結果

問題 No.632 穴埋め門松列
ユーザー NoNo
提出日時 2018-01-19 22:48:13
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 45 ms / 1,000 ms
コード長 497 bytes
コンパイル時間 2,260 ms
コンパイル使用メモリ 99,608 KB
実行使用メモリ 22,504 KB
最終ジャッジ日時 2023-08-26 00:25:42
合計ジャッジ時間 2,668 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
22,504 KB
testcase_01 AC 44 ms
20,660 KB
testcase_02 AC 44 ms
20,404 KB
testcase_03 AC 43 ms
20,436 KB
testcase_04 AC 44 ms
20,468 KB
testcase_05 AC 44 ms
20,492 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace y
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine().Replace(" ","");
            string a = s.Replace("?", "1");
            string b = s.Replace("?", "4");

            if ((a[0] < a[1] && a[1] > a[2]) || (a[0] > a[1] && a[1] < a[2])) Console.Write("1");
            if ((b[0] < b[1] && b[1] > b[2]) || (b[0] > b[1] && b[1] < b[2])) Console.Write("4");
            Console.WriteLine();
        }
    }
}
0