Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Basic_Structure
//'main' method must be in a class 'Rextester'. //openjdk version '11.0.5' import java.io.*; import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); //Input for no. of test cases int t = Integer.parseInt(br.readLine()); // WHILE loop for no. of test cases... while(t-->0){ /* For input Type 5 -> n 1 2 3 4 5 -> n space separated input, for this we use array along with string tokenizer to eliminate space and inputs... */ int n = Integer.parseInt(br.readLine()); // Declaration of array int[] arr = new int[n]; // Declaration of StringTokenizer to tackle space separated inputs by the user... StringTokenizer st = new StringTokenizer(br.readLine()); // Loop for take input in the array for(int i=0;i<n;i++){ arr[i] = Integer.parseInt(st.nextToken()); } //Dynamic Array with no required size...if needed List<Integer> li = new ArrayList<Integer>(); /*............CODE............*/ // Output should be printed here for every test case within while loop System.out.println(); }//End of While loop }//End of main }//End of class
run
|
edit
|
history
|
help
0
JAVA # Karekök Hesaplama
Remove punctuation except numbers, commas and spaces
friend circle problem
problem 11: java program 11
Bank System
mp1
exp5
Find merge point of two linkedlists - solution 1
jb14 isEven Links
Escaping Literals II