結果

問題 No.292 芸名
ユーザー GrenacheGrenache
提出日時 2015-10-23 22:23:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 584 bytes
コンパイル時間 5,698 ms
コンパイル使用メモリ 74,048 KB
実行使用メモリ 56,152 KB
最終ジャッジ日時 2023-09-29 21:53:01
合計ジャッジ時間 6,711 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,876 KB
testcase_01 AC 123 ms
55,760 KB
testcase_02 AC 124 ms
55,968 KB
testcase_03 AC 124 ms
55,940 KB
testcase_04 AC 125 ms
56,112 KB
testcase_05 AC 122 ms
55,784 KB
testcase_06 AC 124 ms
56,152 KB
testcase_07 AC 124 ms
55,960 KB
testcase_08 AC 123 ms
54,184 KB
testcase_09 AC 123 ms
55,676 KB
testcase_10 AC 126 ms
55,444 KB
testcase_11 AC 124 ms
56,012 KB
testcase_12 AC 124 ms
55,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main_yukicoder292 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        int t = sc.nextInt();
        int u = sc.nextInt();

        String ret = s.substring(0, Math.max(t, u));
        ret += s.substring(Math.max(t, u) + 1, s.length());

        s = ret;
        if (t != u) {
            ret = s.substring(0, Math.min(t, u));
            ret += s.substring(Math.min(t, u) + 1, s.length());
        }

        System.out.println(ret);

        sc.close();
    }
}
0