We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
 - Java
 - Introduction
 - Java Loops II
 - Discussions
 
Java Loops II
Java Loops II
Sort by
recency
|
3261 Discussions
|
Please Login in order to post a comment
import java.util.Scanner; import java.lang.Math; // This is no longer needed if we remove Math.pow
class Test { public static void main(String[] args) { Scanner scn = new Scanner(System.in); int q = scn.nextInt();
}
Java Optimal Code (100% beats) #java #coding
import java.io.; import java.util.;
public class Solution {
}
import java.io.; import java.util.;
public class Solution {
}
For Java15 Platform
I wrote the code from scratch just to get more practice
Java
Solution using Map for memoization for better performance