結果

問題 No.197 手品
ユーザー しらゆきしらゆき
提出日時 2015-11-24 00:25:55
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 54 ms / 1,000 ms
コード長 944 bytes
コンパイル時間 4,571 ms
コンパイル使用メモリ 101,760 KB
実行使用メモリ 22,756 KB
最終ジャッジ日時 2023-09-27 09:36:02
合計ジャッジ時間 7,395 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
22,716 KB
testcase_01 AC 48 ms
20,684 KB
testcase_02 AC 50 ms
22,640 KB
testcase_03 AC 50 ms
20,636 KB
testcase_04 AC 50 ms
20,616 KB
testcase_05 AC 51 ms
20,772 KB
testcase_06 AC 48 ms
20,624 KB
testcase_07 AC 48 ms
20,588 KB
testcase_08 AC 52 ms
22,648 KB
testcase_09 AC 52 ms
22,660 KB
testcase_10 AC 50 ms
20,696 KB
testcase_11 AC 50 ms
20,644 KB
testcase_12 AC 50 ms
22,648 KB
testcase_13 AC 49 ms
20,756 KB
testcase_14 AC 50 ms
20,624 KB
testcase_15 AC 49 ms
22,676 KB
testcase_16 AC 49 ms
18,620 KB
testcase_17 AC 49 ms
22,688 KB
testcase_18 AC 51 ms
18,676 KB
testcase_19 AC 50 ms
22,644 KB
testcase_20 AC 48 ms
18,528 KB
testcase_21 AC 50 ms
20,620 KB
testcase_22 AC 49 ms
22,640 KB
testcase_23 AC 50 ms
20,612 KB
testcase_24 AC 49 ms
20,704 KB
testcase_25 AC 51 ms
20,704 KB
testcase_26 AC 51 ms
20,760 KB
testcase_27 AC 50 ms
20,624 KB
testcase_28 AC 51 ms
20,616 KB
testcase_29 AC 51 ms
22,692 KB
testcase_30 AC 52 ms
22,668 KB
testcase_31 AC 50 ms
22,756 KB
testcase_32 AC 53 ms
22,700 KB
testcase_33 AC 53 ms
20,636 KB
testcase_34 AC 50 ms
20,692 KB
testcase_35 AC 50 ms
22,684 KB
testcase_36 AC 50 ms
20,556 KB
testcase_37 AC 49 ms
18,572 KB
testcase_38 AC 54 ms
20,652 KB
testcase_39 AC 50 ms
20,744 KB
testcase_40 AC 50 ms
20,632 KB
testcase_41 AC 50 ms
20,756 KB
testcase_42 AC 52 ms
20,652 KB
testcase_43 AC 52 ms
20,636 KB
testcase_44 AC 51 ms
20,620 KB
testcase_45 AC 52 ms
22,728 KB
testcase_46 AC 51 ms
20,644 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class Program
{
    static void Main()
    {
        string sb = Console.ReadLine();
        int n = int.Parse(Console.ReadLine());
        string sa = Console.ReadLine();

        int cntb = 0;
        int cnta = 0;
        for(int i = 0; i < 3; i++)
        {
            if (sb[i] == 'o') cntb++;
        }
        for (int i = 0; i < 3; i++)
        {
            if (sa[i] == 'o') cnta++;
        }
        if (cntb != cnta)
        {
            Console.WriteLine("SUCCESS");
            return;
        }

        string ans = "FAILURE";

        if (n == 0)
        {
            if (sa != sb) ans = "SUCCESS";
        }
        else if (n == 1)
        {
            string sc = sb[1].ToString() + sb[0].ToString() + sb[2].ToString();
            string sd = sb[0].ToString() + sb[2].ToString() + sb[1].ToString();
            if (sa != sc && sa != sd) ans = "SUCCESS";
        }

        Console.WriteLine(ans);
    }
}
0