結果

問題 No.486 3 Straight Win(3連勝)
ユーザー kmtrc130kmtrc130
提出日時 2017-06-02 17:11:30
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 546 bytes
コンパイル時間 2,046 ms
コンパイル使用メモリ 100,816 KB
実行使用メモリ 23,360 KB
最終ジャッジ日時 2023-09-08 11:08:54
合計ジャッジ時間 5,062 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
21,276 KB
testcase_01 AC 69 ms
21,184 KB
testcase_02 AC 68 ms
21,220 KB
testcase_03 AC 69 ms
21,196 KB
testcase_04 AC 69 ms
21,212 KB
testcase_05 AC 68 ms
21,224 KB
testcase_06 AC 67 ms
21,228 KB
testcase_07 AC 68 ms
21,172 KB
testcase_08 AC 68 ms
21,224 KB
testcase_09 AC 68 ms
23,112 KB
testcase_10 AC 69 ms
19,280 KB
testcase_11 AC 67 ms
21,352 KB
testcase_12 AC 68 ms
23,228 KB
testcase_13 AC 69 ms
21,236 KB
testcase_14 AC 73 ms
21,384 KB
testcase_15 AC 69 ms
21,192 KB
testcase_16 AC 68 ms
21,356 KB
testcase_17 AC 69 ms
21,172 KB
testcase_18 AC 73 ms
21,392 KB
testcase_19 AC 69 ms
23,168 KB
testcase_20 AC 67 ms
19,152 KB
testcase_21 AC 68 ms
21,180 KB
testcase_22 AC 67 ms
19,152 KB
testcase_23 AC 68 ms
19,212 KB
testcase_24 AC 68 ms
19,164 KB
testcase_25 AC 73 ms
21,540 KB
testcase_26 AC 74 ms
23,360 KB
testcase_27 AC 72 ms
19,284 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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;

class Program
{
    static void Main(string[] args)
    {
        string S = Console.ReadLine();

        int east = S.IndexOf("OOO");
        int west = S.IndexOf("XXX");

        if (0 <= west && (west < east || east < 0))
        {
            Console.WriteLine("West");
        }
        else if (0 <= east && (east < west || west < 0))
        {
            Console.WriteLine("East");
        }
        else
        {
            Console.WriteLine("NA");
        }
    }
}
0