結果
問題 | No.197 手品 |
ユーザー | shinwisteria |
提出日時 | 2017-05-03 21:39:56 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 689 bytes |
コンパイル時間 | 3,317 ms |
コンパイル使用メモリ | 72,472 KB |
実行使用メモリ | 58,052 KB |
最終ジャッジ日時 | 2023-09-09 21:17:07 |
合計ジャッジ時間 | 10,394 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 119 ms
56,232 KB |
testcase_07 | AC | 117 ms
56,000 KB |
testcase_08 | AC | 118 ms
55,872 KB |
testcase_09 | AC | 119 ms
55,724 KB |
testcase_10 | AC | 118 ms
56,100 KB |
testcase_11 | AC | 118 ms
55,732 KB |
testcase_12 | WA | - |
testcase_13 | AC | 118 ms
55,724 KB |
testcase_14 | AC | 116 ms
56,380 KB |
testcase_15 | WA | - |
testcase_16 | AC | 120 ms
55,760 KB |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | AC | 118 ms
56,112 KB |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | AC | 117 ms
55,716 KB |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | AC | 118 ms
56,108 KB |
testcase_31 | AC | 118 ms
56,052 KB |
testcase_32 | AC | 120 ms
55,744 KB |
testcase_33 | WA | - |
testcase_34 | AC | 119 ms
55,744 KB |
testcase_35 | AC | 120 ms
56,172 KB |
testcase_36 | WA | - |
testcase_37 | WA | - |
testcase_38 | WA | - |
testcase_39 | WA | - |
testcase_40 | AC | 118 ms
55,968 KB |
testcase_41 | WA | - |
testcase_42 | WA | - |
testcase_43 | AC | 118 ms
56,192 KB |
testcase_44 | WA | - |
testcase_45 | AC | 119 ms
55,600 KB |
testcase_46 | WA | - |
ソースコード
import java.util.Scanner; public class Tejina { public static void main(String[] args) { Scanner s = new Scanner(System.in); StringBuilder be = new StringBuilder(s.next()); int N = s.nextInt(); String af = s.next(); s.close(); for(int i = 0;i < 2;i++){ if(be.charAt(i) != af.charAt(i)){ if(be.charAt(i) == af.charAt(i+1)){ N--; char c = be.charAt(i); be.deleteCharAt(i); be.insert(i+1, c); }else if(be.charAt(i) == af.charAt(2));{ N -= 2; char c = be.charAt(i); be.deleteCharAt(i); be.append(c); } } } if(N < 0 || N%2 == 1){ System.out.println("SUCCESS"); }else{ System.out.println("FAILURE"); } } }