結果

問題 No.88 次はどっちだ
ユーザー NoNo
提出日時 2015-04-20 23:40:53
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,070 bytes
コンパイル時間 2,118 ms
コンパイル使用メモリ 99,960 KB
実行使用メモリ 24,632 KB
最終ジャッジ日時 2023-09-18 02:01:59
合計ジャッジ時間 3,360 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
22,480 KB
testcase_01 AC 48 ms
18,344 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 48 ms
22,572 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 49 ms
22,404 KB
testcase_10 AC 49 ms
20,548 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.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ForYukicoder
{
    class Program
    {
        static void Main(string[] args)
        {
            string S = Console.ReadLine();
            string[] B = new string[8];

            for (int i = 0; i < 8; i++)
            {
                B[i] = Console.ReadLine();
            }

            //-----------------

            int white = 0;
            int black = 0;

            foreach (var row in B)
            {
                foreach (var column in row)
                {
                    if (column == 'w') white++;
                    else if (column == 'b') black++;
                }
            }

            string str;
            if (white == black)
            {
                //黒の順番
                str = S;
            }
            else
            {
                //白の順番
                str = (S == "oda") ? "yukiko" : "oda";
            }

            Console.WriteLine(str);
        }
    }
}
0