結果

問題 No.292 芸名
ユーザー matsuyoshi30matsuyoshi30
提出日時 2016-02-21 10:50:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 881 bytes
コンパイル時間 3,626 ms
コンパイル使用メモリ 74,328 KB
実行使用メモリ 57,596 KB
最終ジャッジ日時 2023-10-23 18:46:34
合計ジャッジ時間 6,079 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
57,144 KB
testcase_01 AC 130 ms
57,380 KB
testcase_02 AC 128 ms
57,492 KB
testcase_03 AC 125 ms
57,452 KB
testcase_04 AC 128 ms
57,340 KB
testcase_05 AC 129 ms
57,380 KB
testcase_06 AC 123 ms
57,368 KB
testcase_07 AC 127 ms
57,528 KB
testcase_08 AC 129 ms
57,464 KB
testcase_09 AC 133 ms
57,596 KB
testcase_10 AC 132 ms
57,480 KB
testcase_11 AC 127 ms
57,392 KB
testcase_12 AC 127 ms
57,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        int t = in.nextInt();
        int u = in.nextInt();

        char[] ans = s.toCharArray();
        if(t == u) {
            for(int i=0; i<s.length(); i++) {
                if(i == t) {
                    continue;
                } else {
                    System.out.print(ans[i]);
                }
            }
            System.out.println();
        } else {
            for(int i=0; i<s.length(); i++) {
                if(i == t) {
                    continue;
                } else if(i == u) {
                    continue;
                } else {
                    System.out.print(ans[i]);
                }
            }
            System.out.println();
        }
    }
}
0