結果

問題 No.197 手品
ユーザー Mcpu3Mcpu3
提出日時 2018-09-16 16:26:59
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 785 bytes
コンパイル時間 2,260 ms
コンパイル使用メモリ 74,564 KB
実行使用メモリ 58,188 KB
最終ジャッジ日時 2023-09-25 09:00:52
合計ジャッジ時間 9,973 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
55,896 KB
testcase_01 AC 128 ms
55,796 KB
testcase_02 AC 130 ms
55,728 KB
testcase_03 AC 130 ms
55,736 KB
testcase_04 AC 129 ms
55,896 KB
testcase_05 AC 132 ms
55,536 KB
testcase_06 AC 129 ms
55,744 KB
testcase_07 AC 127 ms
55,768 KB
testcase_08 AC 130 ms
55,748 KB
testcase_09 AC 129 ms
55,812 KB
testcase_10 AC 129 ms
55,908 KB
testcase_11 AC 130 ms
56,184 KB
testcase_12 AC 128 ms
55,656 KB
testcase_13 AC 129 ms
58,188 KB
testcase_14 AC 129 ms
55,812 KB
testcase_15 AC 128 ms
55,752 KB
testcase_16 AC 130 ms
55,468 KB
testcase_17 AC 130 ms
56,048 KB
testcase_18 AC 132 ms
55,712 KB
testcase_19 AC 131 ms
55,784 KB
testcase_20 AC 129 ms
55,920 KB
testcase_21 AC 131 ms
55,536 KB
testcase_22 AC 130 ms
55,924 KB
testcase_23 WA -
testcase_24 AC 130 ms
55,760 KB
testcase_25 AC 131 ms
55,748 KB
testcase_26 AC 128 ms
55,664 KB
testcase_27 AC 129 ms
55,856 KB
testcase_28 AC 130 ms
55,764 KB
testcase_29 AC 127 ms
55,656 KB
testcase_30 AC 129 ms
55,728 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 129 ms
55,728 KB
testcase_34 AC 128 ms
55,776 KB
testcase_35 AC 129 ms
55,748 KB
testcase_36 AC 128 ms
55,900 KB
testcase_37 AC 127 ms
56,512 KB
testcase_38 AC 127 ms
55,856 KB
testcase_39 AC 127 ms
56,216 KB
testcase_40 AC 128 ms
55,740 KB
testcase_41 AC 129 ms
53,944 KB
testcase_42 AC 126 ms
55,716 KB
testcase_43 AC 129 ms
56,004 KB
testcase_44 AC 131 ms
55,500 KB
testcase_45 AC 129 ms
55,712 KB
testcase_46 AC 133 ms
55,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int n,t[]=new int[2],f=0;
        String s[]=new String[2];
        s[0]=sc.next();
        n=sc.nextInt();
        s[1]=sc.next();
        sc.close();
        for(int i=0;i<2;++i)for(int j=0;j<3;++j)if(s[i].charAt(j)=='o')++t[i];
        if(t[0]!=t[1])f=1;
        else if(2>n&&(n>0&&(s[0].equals("oxo")&&s[1].equals("oxo")||s[0].equals("xox")&&s[1].equals("xox"))||s[0].equals("oox")&&s[1].equals("xoo")||s[0].equals("xoo")&&s[1].equals("oox")||s[0].equals("oxx")&&s[1].equals("xxo")||s[0].equals("xxo")&&s[1].equals("oxx")))f=1;
        else if(1>n&&s[0].equals(s[1]))f=1;
        System.out.print(f>0?"SUCCESS":"FAILURE");
    }
}
0