結果
| 問題 |
No.292 芸名
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-12-11 14:26:24 |
| 言語 | Java (openjdk 23) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 696 bytes |
| コンパイル時間 | 2,113 ms |
| コンパイル使用メモリ | 73,972 KB |
| 実行使用メモリ | 54,528 KB |
| 最終ジャッジ日時 | 2024-09-21 20:38:48 |
| 合計ジャッジ時間 | 4,930 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 RE * 1 |
| other | AC * 7 WA * 2 RE * 1 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
StringBuilder sb = new StringBuilder(s);
int a = sc.nextInt();
int b = sc.nextInt();
if(a==b){
sb.deleteCharAt(a);
System.out.println(sb);
}else{
sb.deleteCharAt(a);
if(b>a){
sb.deleteCharAt(b-1);
}else{
sb.deleteCharAt(b+1);
}
System.out.println(sb);
}
}
}