結果

問題 No.197 手品
ユーザー kuramukuramu
提出日時 2016-01-28 23:40:38
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 1,102 bytes
コンパイル時間 2,256 ms
コンパイル使用メモリ 74,260 KB
実行使用メモリ 51,632 KB
最終ジャッジ日時 2023-09-09 20:44:35
合計ジャッジ時間 5,680 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,348 KB
testcase_01 AC 42 ms
49,308 KB
testcase_02 AC 42 ms
49,184 KB
testcase_03 AC 42 ms
49,208 KB
testcase_04 AC 42 ms
49,248 KB
testcase_05 AC 42 ms
49,200 KB
testcase_06 AC 42 ms
49,316 KB
testcase_07 AC 42 ms
49,704 KB
testcase_08 AC 42 ms
49,200 KB
testcase_09 AC 42 ms
49,104 KB
testcase_10 AC 42 ms
49,112 KB
testcase_11 AC 42 ms
49,104 KB
testcase_12 WA -
testcase_13 AC 42 ms
49,288 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 42 ms
49,464 KB
testcase_24 AC 42 ms
49,688 KB
testcase_25 AC 42 ms
49,128 KB
testcase_26 AC 43 ms
49,548 KB
testcase_27 AC 42 ms
49,100 KB
testcase_28 AC 42 ms
49,108 KB
testcase_29 AC 43 ms
49,060 KB
testcase_30 AC 41 ms
49,168 KB
testcase_31 AC 42 ms
48,980 KB
testcase_32 AC 42 ms
49,304 KB
testcase_33 AC 42 ms
49,412 KB
testcase_34 AC 42 ms
47,076 KB
testcase_35 AC 42 ms
49,192 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 43 ms
49,668 KB
testcase_39 AC 43 ms
49,216 KB
testcase_40 AC 42 ms
49,200 KB
testcase_41 WA -
testcase_42 AC 42 ms
49,416 KB
testcase_43 WA -
testcase_44 WA -
testcase_45 AC 42 ms
49,108 KB
testcase_46 AC 42 ms
49,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
	public static void main(String[] args) {
	      BufferedReader stdReader =new BufferedReader(new InputStreamReader(System.in));
	      try {
	    	  String line1 = stdReader.readLine();
	    	  int n = Integer.parseInt(stdReader.readLine());
	    	  String line2 = stdReader.readLine();

	    	  char[] str1 = new char[3];
	    	  char[] str2 = new char[3];
	    	  for(int i=0;i<line1.length();i++){
    			  str1[i] = line1.charAt(i);
    			  str2[i] = line2.charAt(i);
	    	  }
	    	  if(n % 2 == 0){
	    		  if(line1.equals(line2) || str1[0]==str2[2] && str1[2]==str2[0]){
	    			  System.out.println("FAILURE");
	    		  }else{
	    			  System.out.println("SUCCESS");
	    		  }
	    	  }else{
	    		  if(str1[0]==str2[0] && str1[1]==str2[2] || str1[2]==str2[2] && str1[0] == str2[1]){
	    			  System.out.println("FAILURE");
	    		  }else{
	    			  System.out.println("SUCCESS");
	    		  }
	    	  }
	      } catch (IOException e) {
			e.printStackTrace();
	      }
	}
}
0