Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main;
- import java.io.File;
- import java.util.Scanner;
- public class Misspelling {
- public static void main(String[] args) throws Throwable {
- File file = new File("txt");
- Scanner scan = new Scanner(file);
- int Tc = 0;
- for (int i = 0; i <= 1000; i++) {
- Tc = scan.nextInt();
- if (Tc <= 1000 && Tc >= 1)
- break;
- }
- int c = 0;
- String world = "";
- for (int i = 1; i <= Tc; i++) {
- c = scan.nextInt();
- world = scan.next();
- StringBuffer Fw = new StringBuffer(world);
- System.out.println(i + " " + Fw.deleteCharAt(c - 1));
- }
- }
- }
Add Comment
Please, Sign In to add comment