結果

問題 No.197 手品
ユーザー kuramukuramu
提出日時 2016-01-29 00:43:08
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 1,166 bytes
コンパイル時間 1,950 ms
コンパイル使用メモリ 73,888 KB
実行使用メモリ 51,224 KB
最終ジャッジ日時 2023-09-09 20:45:31
合計ジャッジ時間 5,655 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,112 KB
testcase_01 AC 42 ms
49,112 KB
testcase_02 AC 43 ms
49,180 KB
testcase_03 AC 43 ms
49,276 KB
testcase_04 AC 43 ms
49,276 KB
testcase_05 AC 45 ms
49,280 KB
testcase_06 AC 45 ms
49,264 KB
testcase_07 AC 45 ms
49,396 KB
testcase_08 AC 45 ms
49,356 KB
testcase_09 AC 45 ms
49,556 KB
testcase_10 AC 43 ms
49,592 KB
testcase_11 AC 43 ms
49,288 KB
testcase_12 AC 43 ms
49,180 KB
testcase_13 AC 43 ms
49,176 KB
testcase_14 AC 44 ms
49,276 KB
testcase_15 AC 43 ms
49,492 KB
testcase_16 AC 43 ms
49,584 KB
testcase_17 AC 43 ms
49,300 KB
testcase_18 AC 42 ms
49,220 KB
testcase_19 AC 43 ms
49,668 KB
testcase_20 AC 43 ms
49,428 KB
testcase_21 AC 43 ms
49,596 KB
testcase_22 AC 44 ms
49,192 KB
testcase_23 AC 43 ms
49,392 KB
testcase_24 AC 43 ms
49,352 KB
testcase_25 AC 45 ms
49,224 KB
testcase_26 WA -
testcase_27 AC 43 ms
49,456 KB
testcase_28 AC 44 ms
49,772 KB
testcase_29 AC 44 ms
49,192 KB
testcase_30 AC 43 ms
49,052 KB
testcase_31 AC 44 ms
49,216 KB
testcase_32 AC 44 ms
49,316 KB
testcase_33 AC 41 ms
49,024 KB
testcase_34 WA -
testcase_35 AC 43 ms
49,780 KB
testcase_36 AC 43 ms
47,248 KB
testcase_37 AC 43 ms
49,768 KB
testcase_38 AC 43 ms
49,188 KB
testcase_39 AC 44 ms
49,220 KB
testcase_40 AC 44 ms
49,304 KB
testcase_41 AC 44 ms
49,280 KB
testcase_42 AC 43 ms
49,100 KB
testcase_43 AC 42 ms
49,340 KB
testcase_44 AC 44 ms
49,604 KB
testcase_45 AC 45 ms
49,236 KB
testcase_46 AC 45 ms
49,232 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;
	    	  }else if(line1.equals(line2)){
	    		  System.out.println("FAILURE");
	    		  return;
	    	  }
	    	  if(n==0){
	    		  System.out.println("SUCCESS");
	    	  }else if(n==1){
	    		  if(line1.charAt(0)==line2.charAt(2)&&line1.charAt(2)==line2.charAt(0)) 
	    			  System.out.println("SUCCESS");
	    		  else
	    			  System.out.println("FAILURE");
	    	  }else{
	    		  System.out.println("FAILURE");
	    	  }
	      } catch (IOException e) {
			e.printStackTrace();
	      }
	}
}
0