結果
問題 | No.197 手品 |
ユーザー | kuramu |
提出日時 | 2016-01-29 00:16:38 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,057 bytes |
コンパイル時間 | 2,017 ms |
コンパイル使用メモリ | 74,484 KB |
実行使用メモリ | 51,228 KB |
最終ジャッジ日時 | 2023-09-09 20:44:53 |
合計ジャッジ時間 | 5,678 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | AC | 42 ms
49,284 KB |
testcase_04 | AC | 42 ms
49,160 KB |
testcase_05 | WA | - |
testcase_06 | AC | 42 ms
49,204 KB |
testcase_07 | AC | 42 ms
49,600 KB |
testcase_08 | AC | 43 ms
49,360 KB |
testcase_09 | AC | 42 ms
49,112 KB |
testcase_10 | WA | - |
testcase_11 | AC | 42 ms
49,116 KB |
testcase_12 | WA | - |
testcase_13 | AC | 41 ms
49,392 KB |
testcase_14 | WA | - |
testcase_15 | AC | 42 ms
47,580 KB |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | AC | 43 ms
49,300 KB |
testcase_21 | AC | 43 ms
49,528 KB |
testcase_22 | AC | 44 ms
49,296 KB |
testcase_23 | WA | - |
testcase_24 | AC | 43 ms
49,208 KB |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | AC | 42 ms
49,188 KB |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | AC | 41 ms
49,020 KB |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | AC | 41 ms
49,240 KB |
testcase_36 | AC | 41 ms
49,112 KB |
testcase_37 | WA | - |
testcase_38 | WA | - |
testcase_39 | WA | - |
testcase_40 | AC | 42 ms
49,568 KB |
testcase_41 | AC | 42 ms
49,216 KB |
testcase_42 | WA | - |
testcase_43 | AC | 42 ms
49,356 KB |
testcase_44 | WA | - |
testcase_45 | WA | - |
testcase_46 | WA | - |
ソースコード
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)){ }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(); } } }