Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.PrintWriter;
- import java.io.BufferedReader;
- import java.io.InputStreamReader;
- import java.util.StringTokenizer;
- import java.io.IOException;
- import java.io.BufferedWriter;
- import java.io.OutputStreamWriter;
- import java.io.OutputStream;
- class TestClass {
- static InputReader in = new InputReader();
- static OutputWriter out = new OutputWriter(System.out);
- public static void main(String args[] ) throws Exception {
- solve();
- out.flush();
- out.close();
- }
- static void solve() {
- }
- static class InputReader {
- BufferedReader br;
- StringTokenizer st;
- public InputReader() {
- br = new BufferedReader(new InputStreamReader(System.in));
- }
- String next() {
- while (st == null || !st.hasMoreElements()) {
- try {
- st = new StringTokenizer(br.readLine());
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- return st.nextToken();
- }
- int nextInt() { return Integer.parseInt(next()); }
- long nextLong() { return Long.parseLong(next()); }
- double nextDouble() { return Double.parseDouble(next()); }
- String nextLine(){
- String str = "";
- try {
- str = br.readLine();
- } catch (IOException e) {
- e.printStackTrace();
- }
- return str;
- }
- }
- class OutputWriter {
- private final PrintWriter writer;
- public OutputWriter(OutputStream outputStream) {
- writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
- }
- public OutputWriter(Writer writer) {
- this.writer = new PrintWriter(writer);
- }
- public void print(Object...objects) {
- for (int i = 0; i < objects.length; i++) {
- if (i != 0)
- writer.print(' ');
- writer.print(objects[i]);
- }
- }
- public void println(Object...objects) {
- print(objects);
- writer.println();
- }
- public void close() {
- writer.close();
- }
- public void flush() {
- writer.flush();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement