結果
| 問題 | No.486 3 Straight Win(3連勝) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-27 13:19:17 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 23 ms / 2,000 ms |
| コード長 | 839 bytes |
| 記録 | |
| コンパイル時間 | 645 ms |
| コンパイル使用メモリ | 111,808 KB |
| 実行使用メモリ | 26,936 KB |
| 最終ジャッジ日時 | 2026-03-12 17:41:55 |
| 合計ジャッジ時間 | 1,888 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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.Linq;
using System.Collections.Generic;
class Program
{
static void Main(string[] args)
{
string s = Console.ReadLine();
int eFlg = 0;
int wFlg = 0;
string ans = "NA";
if (s.Contains("OOO"))
{
eFlg = 1;
}
if (s.Contains("XXX"))
{
wFlg = 1;
}
if (eFlg == 1 && wFlg == 1)
{
if (s.IndexOf("OOO") < s.IndexOf("XXX"))
{
ans = "East";
}
else
{
ans = "West";
}
}
else if (eFlg == 1)
{
ans = "East";
}
else if (wFlg == 1)
{
ans = "West";
}
Console.WriteLine(ans);
Console.Read();
}
}