結果
問題 |
No.486 3 Straight Win(3連勝)
|
ユーザー |
![]() |
提出日時 | 2017-06-02 17:11:30 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 28 ms / 2,000 ms |
コード長 | 546 bytes |
コンパイル時間 | 1,294 ms |
コンパイル使用メモリ | 102,016 KB |
実行使用メモリ | 18,432 KB |
最終ジャッジ日時 | 2024-06-26 04:27:56 |
合計ジャッジ時間 | 2,514 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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"); } } }