結果
問題 |
No.486 3 Straight Win(3連勝)
|
ユーザー |
![]() |
提出日時 | 2018-02-17 20:13:40 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 28 ms / 2,000 ms |
コード長 | 888 bytes |
コンパイル時間 | 794 ms |
コンパイル使用メモリ | 102,400 KB |
実行使用メモリ | 18,432 KB |
最終ジャッジ日時 | 2024-06-26 04:38:50 |
合計ジャッジ時間 | 2,435 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; 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"); } } } }