結果

問題 No.197 手品
ユーザー mbanmban
提出日時 2016-12-25 11:17:56
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 51 ms / 1,000 ms
コード長 1,268 bytes
コンパイル時間 2,104 ms
コンパイル使用メモリ 108,964 KB
実行使用メモリ 24,792 KB
最終ジャッジ日時 2023-09-27 09:43:08
合計ジャッジ時間 5,681 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
22,732 KB
testcase_01 AC 48 ms
20,672 KB
testcase_02 AC 47 ms
22,732 KB
testcase_03 AC 47 ms
22,744 KB
testcase_04 AC 49 ms
22,748 KB
testcase_05 AC 48 ms
20,688 KB
testcase_06 AC 47 ms
20,728 KB
testcase_07 AC 48 ms
20,888 KB
testcase_08 AC 47 ms
20,876 KB
testcase_09 AC 48 ms
22,924 KB
testcase_10 AC 46 ms
18,644 KB
testcase_11 AC 47 ms
20,720 KB
testcase_12 AC 48 ms
18,704 KB
testcase_13 AC 48 ms
22,776 KB
testcase_14 AC 48 ms
20,668 KB
testcase_15 AC 49 ms
18,644 KB
testcase_16 AC 49 ms
22,732 KB
testcase_17 AC 47 ms
20,696 KB
testcase_18 AC 47 ms
20,776 KB
testcase_19 AC 48 ms
20,772 KB
testcase_20 AC 49 ms
20,800 KB
testcase_21 AC 49 ms
24,792 KB
testcase_22 AC 48 ms
20,772 KB
testcase_23 AC 48 ms
22,700 KB
testcase_24 AC 48 ms
20,764 KB
testcase_25 AC 48 ms
20,784 KB
testcase_26 AC 50 ms
20,736 KB
testcase_27 AC 49 ms
20,612 KB
testcase_28 AC 49 ms
22,728 KB
testcase_29 AC 50 ms
20,688 KB
testcase_30 AC 51 ms
22,760 KB
testcase_31 AC 50 ms
22,852 KB
testcase_32 AC 50 ms
18,636 KB
testcase_33 AC 47 ms
20,656 KB
testcase_34 AC 48 ms
22,796 KB
testcase_35 AC 48 ms
20,804 KB
testcase_36 AC 47 ms
20,856 KB
testcase_37 AC 48 ms
22,736 KB
testcase_38 AC 48 ms
20,720 KB
testcase_39 AC 48 ms
22,768 KB
testcase_40 AC 48 ms
22,732 KB
testcase_41 AC 51 ms
22,820 KB
testcase_42 AC 50 ms
20,868 KB
testcase_43 AC 49 ms
22,668 KB
testcase_44 AC 49 ms
20,692 KB
testcase_45 AC 50 ms
18,664 KB
testcase_46 AC 47 ms
20,860 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;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Text.RegularExpressions;
using System.Linq;

class Magatro
{
    static string B = Console.ReadLine();
    static int N = int.Parse(Console.ReadLine());
    static string A = Console.ReadLine();
    static void Main()
    {
        int tempa = 0;
        int tempb = 0;
      for(int i = 0; i < 3; i++)
        {
            if (B[i] == 'o') tempb++;
            else tempb--;
            if (A[i] == 'o') tempa++;
            else tempa--;
        }
        if (tempa != tempb)
        {
            Console.WriteLine("SUCCESS");
            return;
        }
        if (N == 0)
        {
            if (B == A)
            {
                Console.WriteLine("FAILURE");
                return;
            }
            else
            {
                Console.WriteLine("SUCCESS");
            }
        }
        else if (N == 1)
        {
            if((A[0]==B[0]&&A[1]==B[2]&&A[2]==B[1])|| (A[2] == B[2] && A[1] == B[0] && A[0] == B[1])) Console.WriteLine("FAILURE");
            else Console.WriteLine("SUCCESS");
        }
        else
        {
            Console.WriteLine("FAILURE");
        }
    }

}


0