結果
| 問題 |
No.486 3 Straight Win(3連勝)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-28 12:11:50 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 402 bytes |
| コンパイル時間 | 3,350 ms |
| コンパイル使用メモリ | 111,100 KB |
| 実行使用メモリ | 25,564 KB |
| 最終ジャッジ日時 | 2024-06-11 22:50:15 |
| 合計ジャッジ時間 | 4,879 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 WA * 9 |
コンパイルメッセージ
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;
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");
}
}