Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.95 KB | None | 0 0
  1. import java.io.*;
  2. import java.util.*;
  3.  
  4. public class FastRead {
  5.     public static void main(String[] args) {
  6.         FastScanner scanner = new FastScanner(System.in);
  7.         int n = scanner.nextInt();
  8.     }
  9.  
  10.     static class FastScanner {
  11.         BufferedReader br;
  12.         StringTokenizer st;
  13.  
  14.         FastScanner(InputStream stream) {
  15.             try {
  16.                 br = new BufferedReader(new InputStreamReader(stream));
  17.             } catch (Exception e) {
  18.                 e.printStackTrace();
  19.             }
  20.         }
  21.  
  22.         String next() {
  23.             while (st == null || !st.hasMoreTokens()) {
  24.                 try {
  25.                     st = new StringTokenizer(br.readLine());
  26.                 } catch (IOException e) {
  27.                     e.printStackTrace();
  28.                 }
  29.             }
  30.             return st.nextToken();
  31.         }
  32.  
  33.         int nextInt() {
  34.             return Integer.parseInt(next());
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement