結果

問題 No.486 3 Straight Win(3連勝)
ユーザー mencottonmencotton
提出日時 2017-12-27 16:49:33
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 52 ms / 2,000 ms
コード長 648 bytes
コンパイル時間 1,982 ms
コンパイル使用メモリ 99,620 KB
実行使用メモリ 22,676 KB
最終ジャッジ日時 2023-09-08 11:17:52
合計ジャッジ時間 4,418 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
20,568 KB
testcase_01 AC 50 ms
22,516 KB
testcase_02 AC 49 ms
22,676 KB
testcase_03 AC 49 ms
20,636 KB
testcase_04 AC 49 ms
20,436 KB
testcase_05 AC 48 ms
18,508 KB
testcase_06 AC 49 ms
22,456 KB
testcase_07 AC 49 ms
20,528 KB
testcase_08 AC 49 ms
22,496 KB
testcase_09 AC 49 ms
20,596 KB
testcase_10 AC 50 ms
20,528 KB
testcase_11 AC 49 ms
20,500 KB
testcase_12 AC 49 ms
20,524 KB
testcase_13 AC 49 ms
20,476 KB
testcase_14 AC 49 ms
22,572 KB
testcase_15 AC 48 ms
20,464 KB
testcase_16 AC 49 ms
20,480 KB
testcase_17 AC 52 ms
22,488 KB
testcase_18 AC 48 ms
20,596 KB
testcase_19 AC 48 ms
20,528 KB
testcase_20 AC 49 ms
22,508 KB
testcase_21 AC 49 ms
22,516 KB
testcase_22 AC 48 ms
22,436 KB
testcase_23 AC 49 ms
22,580 KB
testcase_24 AC 50 ms
20,572 KB
testcase_25 AC 50 ms
20,464 KB
testcase_26 AC 49 ms
22,452 KB
testcase_27 AC 49 ms
20,468 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;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string ret = "";
            for (int i = 0; i <= s.Length - 3; i++)
            {
                if (s.Substring(i,3) == "OOO" && ret == "")
                {
                    ret = "East";
                }
                else if (s.Substring(i,3) == "XXX" && ret == "")
                {
                    ret = "West";
                }
            }
            Console.WriteLine(ret == "" ? "NA" : ret);
        }
    }
}
0