結果

問題 No.292 芸名
ユーザー kou6839kou6839
提出日時 2015-10-24 01:12:07
言語 Java19
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 443 bytes
コンパイル時間 3,604 ms
コンパイル使用メモリ 72,008 KB
実行使用メモリ 56,204 KB
最終ジャッジ日時 2023-10-11 05:16:45
合計ジャッジ時間 5,108 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,764 KB
testcase_01 AC 122 ms
55,616 KB
testcase_02 AC 122 ms
55,808 KB
testcase_03 AC 122 ms
55,820 KB
testcase_04 AC 123 ms
55,564 KB
testcase_05 AC 121 ms
54,328 KB
testcase_06 AC 122 ms
55,964 KB
testcase_07 AC 121 ms
55,784 KB
testcase_08 AC 120 ms
56,192 KB
testcase_09 AC 120 ms
55,744 KB
testcase_10 AC 126 ms
55,452 KB
testcase_11 AC 121 ms
56,204 KB
testcase_12 AC 122 ms
55,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		StringBuilder in = new StringBuilder(sc.next());
		int n = sc.nextInt();
		int m = sc.nextInt();
		if(n==m){
			in.replace(n, n+1, "");
		}
		
		if(n<m){
			in.replace(n, n+1, "");
			in.replace(m-1, m, "");
		}
		if(n>m){
			in.replace(n, n+1, "");
			in.replace(m, m+1, "");
		}
		
		System.out.println(in);
	}
}
0