Skip to content

Instantly share code, notes, and snippets.

@bhi5hmaraj
Last active May 7, 2022 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bhi5hmaraj/0f1c75081542d31db8f31ae146218ea1 to your computer and use it in GitHub Desktop.
Save bhi5hmaraj/0f1c75081542d31db8f31ae146218ea1 to your computer and use it in GitHub Desktop.
import java.util.*;
import java.io.*;
class {
public static void main(String args[]) {
FastScanner scan = new FasrScanner();
PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out), true); //Close the output stream after use
int t = scan.nextInt();
while(t-->0) {
out.println(t);
}
out.close();
}
static class FastScanner {
BufferedReader br;
StringTokenizer st;
public FastScanner() {
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;
}
int[] nextIntArray(int n) {
int[] arr = new int[n];
for (int i = 0; i < n; i++) {
arr[i] = nextInt();
}
return arr;
}
long[] nextLongArray(int n) {
long[] arr = new long[n];
for (int i = 0; i < n; i++) {
arr[i] = nextLong();
}
return arr;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment