Guest User

Untitled

a guest
Feb 18th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. package main;
  2.  
  3. import java.io.File;
  4. import java.util.Scanner;
  5.  
  6. public class Misspelling {
  7. public static void main(String[] args) throws Throwable {
  8. File file = new File("txt");
  9. Scanner scan = new Scanner(file);
  10. int Tc = 0;
  11. for (int i = 0; i <= 1000; i++) {
  12. Tc = scan.nextInt();
  13. if (Tc <= 1000 && Tc >= 1)
  14. break;
  15. }
  16. int c = 0;
  17. String world = "";
  18. for (int i = 1; i <= Tc; i++) {
  19. c = scan.nextInt();
  20. world = scan.next();
  21. StringBuffer Fw = new StringBuffer(world);
  22. System.out.println(i + " " + Fw.deleteCharAt(c - 1));
  23. }
  24. }
  25.  
  26. }
Add Comment
Please, Sign In to add comment