結果

問題 No.486 3 Straight Win(3連勝)
ユーザー nattoumarunattoumaru
提出日時 2018-02-17 20:13:40
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 888 bytes
コンパイル時間 1,115 ms
コンパイル使用メモリ 63,068 KB
実行使用メモリ 23,360 KB
最終ジャッジ日時 2023-09-08 11:20:31
合計ジャッジ時間 4,256 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
19,196 KB
testcase_01 AC 67 ms
21,176 KB
testcase_02 AC 68 ms
23,256 KB
testcase_03 AC 68 ms
23,316 KB
testcase_04 AC 67 ms
21,056 KB
testcase_05 AC 68 ms
21,288 KB
testcase_06 AC 68 ms
23,240 KB
testcase_07 AC 67 ms
21,232 KB
testcase_08 AC 68 ms
21,196 KB
testcase_09 AC 68 ms
21,180 KB
testcase_10 AC 67 ms
21,056 KB
testcase_11 AC 69 ms
21,268 KB
testcase_12 AC 69 ms
23,164 KB
testcase_13 AC 68 ms
21,316 KB
testcase_14 AC 74 ms
19,484 KB
testcase_15 AC 67 ms
21,152 KB
testcase_16 AC 67 ms
21,128 KB
testcase_17 AC 67 ms
19,064 KB
testcase_18 AC 72 ms
21,388 KB
testcase_19 AC 69 ms
21,176 KB
testcase_20 AC 68 ms
21,160 KB
testcase_21 AC 67 ms
23,168 KB
testcase_22 AC 68 ms
21,116 KB
testcase_23 AC 67 ms
21,152 KB
testcase_24 AC 68 ms
21,292 KB
testcase_25 AC 72 ms
23,360 KB
testcase_26 AC 73 ms
21,300 KB
testcase_27 AC 73 ms
21,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

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

                int w = marubatsu.IndexOf("XXX");
                int e = marubatsu.IndexOf("OOO");

            if (w == e)
            {
                Console.WriteLine("NA");
            }
            else if (e == -1)
            {
                Console.WriteLine("West");
            }
            else if (w == -1)
            {
                Console.WriteLine("East");
            }
            else if (w < e)
            {
                Console.WriteLine("West");
            }
            else
            {
                Console.WriteLine("East");
            }
            
        }
    }
}
0