結果

問題 No.292 芸名
ユーザー r.suzukir.suzuki
提出日時 2015-12-11 15:05:53
言語 Java19
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 732 bytes
コンパイル時間 4,265 ms
コンパイル使用メモリ 72,392 KB
実行使用メモリ 55,964 KB
最終ジャッジ日時 2023-10-13 10:54:53
合計ジャッジ時間 6,242 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,608 KB
testcase_01 AC 125 ms
55,676 KB
testcase_02 AC 126 ms
55,684 KB
testcase_03 AC 125 ms
55,500 KB
testcase_04 AC 124 ms
55,800 KB
testcase_05 AC 124 ms
55,860 KB
testcase_06 AC 124 ms
55,920 KB
testcase_07 AC 128 ms
55,312 KB
testcase_08 AC 125 ms
55,608 KB
testcase_09 AC 123 ms
55,784 KB
testcase_10 AC 124 ms
55,964 KB
testcase_11 AC 123 ms
55,752 KB
testcase_12 AC 123 ms
55,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No_292 {
	static void sameNumber(StringBuffer s,int i){
		System.out.println(s.deleteCharAt(i));
	}
	
	static void differentNumber(StringBuffer s,int i,int j){
		s.deleteCharAt(i);
		System.out.println(s.deleteCharAt(j));
	}
	

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		StringBuffer stageName = new StringBuffer(s);
		int advice_B = sc.nextInt();
		int advice_C = sc.nextInt();
		
		if(advice_B == advice_C){
			sameNumber(stageName,advice_B);
		}
		else{
			int bigNum = Math.max(advice_B, advice_C);
			int smallNum = Math.min(advice_B, advice_C);
			differentNumber(stageName,bigNum,smallNum);
					
		}
		sc.close();

	}

}
0