結果

問題 No.292 芸名
ユーザー Grenache
提出日時 2015-10-23 22:23:40
言語 Java
(openjdk 23)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 584 bytes
コンパイル時間 6,208 ms
コンパイル使用メモリ 76,504 KB
実行使用メモリ 41,580 KB
最終ジャッジ日時 2024-07-22 15:52:54
合計ジャッジ時間 6,503 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

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