結果

問題 No.292 芸名
ユーザー AoiroFukurou
提出日時 2016-01-05 13:47:22
言語 Java
(openjdk 23)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 616 bytes
コンパイル時間 3,762 ms
コンパイル使用メモリ 76,388 KB
実行使用メモリ 41,352 KB
最終ジャッジ日時 2024-09-19 11:21:48
合計ジャッジ時間 5,583 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

package yuki_coder;

import java.util.Scanner;

public class No_292 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		sc.close();
		String[] str = S.split(" ", 0);
		String[] st = new String[str[0].length()];
		String S2 = "";
		int t = Integer.parseInt(str[1]);
		int u = Integer.parseInt(str[2]);
		for(int i = 1; i <= str[0].length(); i++){
			st[i-1] = str[0].substring(i-1, i);
		}
		if(t==u){
			st[t] = "";
		}else{
			st[t] = "";
			st[u] = "";
		}
		for(int i = 0; i < str[0].length(); i++){
			S2 += st[i];
		}
		System.out.println(S2);
	}
	}
0