結果

問題 No.197 手品
ユーザー kuramukuramu
提出日時 2016-01-29 00:19:12
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 1,097 bytes
コンパイル時間 2,013 ms
コンパイル使用メモリ 73,672 KB
実行使用メモリ 49,780 KB
最終ジャッジ日時 2023-09-09 20:45:02
合計ジャッジ時間 5,452 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
49,300 KB
testcase_01 AC 43 ms
49,252 KB
testcase_02 AC 41 ms
49,376 KB
testcase_03 AC 41 ms
49,208 KB
testcase_04 AC 41 ms
49,304 KB
testcase_05 WA -
testcase_06 AC 40 ms
49,108 KB
testcase_07 AC 41 ms
49,156 KB
testcase_08 AC 41 ms
49,268 KB
testcase_09 AC 43 ms
49,376 KB
testcase_10 AC 43 ms
49,324 KB
testcase_11 AC 42 ms
49,080 KB
testcase_12 WA -
testcase_13 AC 41 ms
49,412 KB
testcase_14 WA -
testcase_15 AC 41 ms
49,188 KB
testcase_16 WA -
testcase_17 AC 41 ms
49,168 KB
testcase_18 AC 41 ms
49,160 KB
testcase_19 AC 41 ms
49,216 KB
testcase_20 AC 41 ms
49,260 KB
testcase_21 AC 42 ms
49,272 KB
testcase_22 AC 41 ms
49,124 KB
testcase_23 AC 41 ms
49,108 KB
testcase_24 AC 42 ms
49,120 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 41 ms
49,444 KB
testcase_28 AC 42 ms
49,208 KB
testcase_29 AC 41 ms
49,292 KB
testcase_30 WA -
testcase_31 AC 41 ms
49,296 KB
testcase_32 AC 41 ms
49,336 KB
testcase_33 AC 41 ms
49,256 KB
testcase_34 WA -
testcase_35 AC 41 ms
49,156 KB
testcase_36 AC 40 ms
49,400 KB
testcase_37 AC 41 ms
49,536 KB
testcase_38 WA -
testcase_39 AC 42 ms
49,152 KB
testcase_40 AC 41 ms
49,176 KB
testcase_41 AC 42 ms
49,064 KB
testcase_42 AC 42 ms
49,296 KB
testcase_43 AC 42 ms
49,404 KB
testcase_44 AC 42 ms
49,212 KB
testcase_45 AC 42 ms
49,108 KB
testcase_46 AC 42 ms
49,308 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();
	    	  int num1 = 0;
	    	  int num2 = 0;
	    	  for(int i=0;i<3;i++){
	    		  if(line1.charAt(i) == 'o') num1++;
	    		  if(line2.charAt(i) == 'o') num2++;    		  
	    	  }
	    	  if(num1 != num2){
	    		  System.out.println("SUCCESS");
	    		  return;
	    	  }
	    	  if(line1.equals(line2)){
	    		  System.out.println("FAILURE");
	    	  }else if((line1.charAt(0)==line2.charAt(2))&&n>=2){
	    		  System.out.println("FAILURE");
	    	  }else if((line1.charAt(0)!=line2.charAt(1)||line1.charAt(1)!=line2.charAt(2))&&n>=1){
	    		  System.out.println("FAILURE");
	    	  }else System.out.println("SUCCESS");
	      } catch (IOException e) {
			e.printStackTrace();
	      }
	}
}
0