結果

問題 No.486 3 Straight Win(3連勝)
ユーザー swdamdrswdamdr
提出日時 2017-02-27 13:19:17
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 839 bytes
コンパイル時間 2,080 ms
コンパイル使用メモリ 100,752 KB
実行使用メモリ 23,248 KB
最終ジャッジ日時 2023-09-08 10:52:40
合計ジャッジ時間 5,045 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
20,584 KB
testcase_01 AC 51 ms
22,460 KB
testcase_02 AC 52 ms
22,524 KB
testcase_03 AC 70 ms
19,216 KB
testcase_04 AC 69 ms
21,192 KB
testcase_05 AC 70 ms
21,308 KB
testcase_06 AC 50 ms
20,604 KB
testcase_07 AC 70 ms
21,160 KB
testcase_08 AC 52 ms
22,496 KB
testcase_09 AC 71 ms
23,232 KB
testcase_10 AC 69 ms
21,260 KB
testcase_11 AC 70 ms
21,148 KB
testcase_12 AC 70 ms
23,236 KB
testcase_13 AC 51 ms
22,444 KB
testcase_14 AC 51 ms
20,488 KB
testcase_15 AC 51 ms
18,364 KB
testcase_16 AC 70 ms
21,356 KB
testcase_17 AC 51 ms
20,512 KB
testcase_18 AC 51 ms
22,500 KB
testcase_19 AC 51 ms
18,544 KB
testcase_20 AC 50 ms
20,544 KB
testcase_21 AC 52 ms
22,596 KB
testcase_22 AC 69 ms
23,248 KB
testcase_23 AC 69 ms
23,220 KB
testcase_24 AC 51 ms
20,564 KB
testcase_25 AC 51 ms
20,540 KB
testcase_26 AC 52 ms
22,532 KB
testcase_27 AC 51 ms
22,548 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.Linq;
using System.Collections.Generic;

class Program
{
    static void Main(string[] args)
    {
        string s = Console.ReadLine();
        int eFlg = 0;
        int wFlg = 0;
        string ans = "NA";

        if (s.Contains("OOO"))
        {
            eFlg = 1;
        }

        if (s.Contains("XXX"))
        {
            wFlg = 1;
        }

        if (eFlg == 1 && wFlg == 1)
        {
            if (s.IndexOf("OOO") < s.IndexOf("XXX"))
            {
                ans = "East";
            }
            else
            {
                ans = "West";
            }
        }
        else if (eFlg == 1)
        {
            ans = "East";
        }
        else if (wFlg == 1)
        {
            ans = "West";
        }

        Console.WriteLine(ans);
        Console.Read();
    }
}
0