結果

問題 No.486 3 Straight Win(3連勝)
ユーザー kimnykimny
提出日時 2017-12-07 17:16:57
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 822 bytes
コンパイル時間 1,882 ms
コンパイル使用メモリ 101,172 KB
実行使用メモリ 23,460 KB
最終ジャッジ日時 2023-09-08 11:17:32
合計ジャッジ時間 4,922 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
21,324 KB
testcase_01 AC 67 ms
21,184 KB
testcase_02 AC 67 ms
23,188 KB
testcase_03 AC 67 ms
23,172 KB
testcase_04 AC 66 ms
21,132 KB
testcase_05 AC 67 ms
21,188 KB
testcase_06 AC 66 ms
21,212 KB
testcase_07 AC 67 ms
21,192 KB
testcase_08 AC 68 ms
21,200 KB
testcase_09 AC 68 ms
21,236 KB
testcase_10 AC 68 ms
23,176 KB
testcase_11 AC 68 ms
21,196 KB
testcase_12 AC 68 ms
21,160 KB
testcase_13 AC 68 ms
21,260 KB
testcase_14 AC 71 ms
19,372 KB
testcase_15 AC 67 ms
23,308 KB
testcase_16 AC 68 ms
21,184 KB
testcase_17 AC 66 ms
19,140 KB
testcase_18 AC 72 ms
23,460 KB
testcase_19 AC 68 ms
23,104 KB
testcase_20 AC 67 ms
21,272 KB
testcase_21 AC 67 ms
23,192 KB
testcase_22 AC 67 ms
23,160 KB
testcase_23 AC 67 ms
23,156 KB
testcase_24 AC 67 ms
23,292 KB
testcase_25 AC 72 ms
21,352 KB
testcase_26 AC 72 ms
21,476 KB
testcase_27 AC 74 ms
21,516 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;
using System.Text;
using System.Threading.Tasks;

namespace yukicoder_486 {
    class Program {
        static void Main(string[] args) {
            string s = Console.ReadLine();
            int east = s.IndexOf("OOO");
            int west = s.IndexOf("XXX");
            if (east < 0 && west < 0) {
                Console.WriteLine("NA");
            }else if (east < 0) {
                Console.WriteLine("West");
            }else if (west < 0) {
                Console.WriteLine("East");
            } else {
                if (east < west) {
                    Console.WriteLine("East");
                } else {
                    Console.WriteLine("West");
                }
            }
            Console.ReadLine();
        }
    }
}
0