結果

問題 No.88 次はどっちだ
ユーザー うに太郎うに太郎
提出日時 2015-06-10 11:35:39
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 48 ms / 5,000 ms
コード長 923 bytes
コンパイル時間 1,988 ms
コンパイル使用メモリ 105,160 KB
実行使用メモリ 22,652 KB
最終ジャッジ日時 2023-09-20 20:30:57
合計ジャッジ時間 3,132 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
20,404 KB
testcase_01 AC 48 ms
20,564 KB
testcase_02 AC 48 ms
20,464 KB
testcase_03 AC 48 ms
22,484 KB
testcase_04 AC 48 ms
20,476 KB
testcase_05 AC 48 ms
20,460 KB
testcase_06 AC 47 ms
20,564 KB
testcase_07 AC 48 ms
22,564 KB
testcase_08 AC 48 ms
22,652 KB
testcase_09 AC 48 ms
20,464 KB
testcase_10 AC 48 ms
22,508 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 ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            bool isSaki = true;
            string saki = Console.ReadLine();
            string str = "";
            for (int i = 0; i < 8; i++)
            {
                str += Console.ReadLine();
            }

            for (int i = 0; i < str.Length; i++)
            {
                if (str[i] == 'w' || str[i] == 'b')
                {
                    isSaki = (isSaki) ? false : true;
                }
            }

            string ans;
            if (isSaki)
            {
                ans = saki;
            }
            else
            {
                ans = (saki == "oda") ? "yukiko" : "oda";
            }

            Console.WriteLine(ans);
        }
    }
}
0