結果

問題 No.486 3 Straight Win(3連勝)
ユーザー abL8ZLsTbFabL8ZLsTbF
提出日時 2017-02-28 12:11:50
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 402 bytes
コンパイル時間 3,016 ms
コンパイル使用メモリ 103,184 KB
実行使用メモリ 22,524 KB
最終ジャッジ日時 2023-09-02 16:17:34
合計ジャッジ時間 6,437 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
20,548 KB
testcase_01 AC 47 ms
20,436 KB
testcase_02 AC 48 ms
20,324 KB
testcase_03 AC 47 ms
22,412 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 47 ms
22,516 KB
testcase_07 AC 48 ms
22,420 KB
testcase_08 AC 47 ms
20,532 KB
testcase_09 WA -
testcase_10 AC 47 ms
20,512 KB
testcase_11 AC 47 ms
20,532 KB
testcase_12 WA -
testcase_13 AC 47 ms
22,420 KB
testcase_14 AC 46 ms
20,556 KB
testcase_15 WA -
testcase_16 AC 48 ms
20,480 KB
testcase_17 WA -
testcase_18 AC 47 ms
20,380 KB
testcase_19 AC 47 ms
22,456 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 47 ms
20,576 KB
testcase_23 AC 47 ms
20,484 KB
testcase_24 WA -
testcase_25 AC 48 ms
22,456 KB
testcase_26 AC 48 ms
20,580 KB
testcase_27 AC 47 ms
22,452 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.Linq;

public class Test
{
	public static void Main()
	{
		var S = Console.ReadLine();
		int east = 0, west = 0;
		for (int i = 0; i < S.Length; i++)
		{
			if (S[i] == 'O')
			{
				if (++east == 3)
				{
					Console.WriteLine("East");
					return;
				}
			}
			else if (++west == 3)
			{
				Console.WriteLine("West");
				return;
			}
		}
		Console.WriteLine("NA");
	}
}
0