結果

問題 No.292 芸名
ユーザー YamaKasaYamaKasa
提出日時 2018-05-02 00:15:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 565 bytes
コンパイル時間 2,375 ms
コンパイル使用メモリ 72,244 KB
実行使用メモリ 56,152 KB
最終ジャッジ日時 2023-09-10 08:49:19
合計ジャッジ時間 4,697 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
55,732 KB
testcase_01 AC 130 ms
55,792 KB
testcase_02 AC 130 ms
55,692 KB
testcase_03 AC 123 ms
55,556 KB
testcase_04 AC 118 ms
55,756 KB
testcase_05 AC 122 ms
55,488 KB
testcase_06 AC 121 ms
55,764 KB
testcase_07 AC 121 ms
55,868 KB
testcase_08 AC 120 ms
56,092 KB
testcase_09 AC 121 ms
56,152 KB
testcase_10 AC 123 ms
55,860 KB
testcase_11 AC 123 ms
56,084 KB
testcase_12 AC 120 ms
55,704 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

		StringBuilder sb = new StringBuilder();
		sb.append(S);
		if(t == u) {
			sb.deleteCharAt(t);
			System.out.println(sb.toString());
		}else if(t > u) {
			sb.deleteCharAt(t);
			sb.deleteCharAt(u);
			System.out.println(sb.toString());
		}else {
			sb.deleteCharAt(u);
			sb.deleteCharAt(t);
			System.out.println(sb.toString());
		}
	}
}
0